Skip to content

Instantly share code, notes, and snippets.

@skryvets
Last active March 30, 2022 18:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skryvets/97cefa2d144425f17fb8d3a5098d7638 to your computer and use it in GitHub Desktop.
Save skryvets/97cefa2d144425f17fb8d3a5098d7638 to your computer and use it in GitHub Desktop.
Python Cheat Sheet

pyenv

pyenv versions # show installed versions
pyenv install --list | grep " 3\.[6]" # show available versions for prefix
pyenv install 3.6.8 # install specific version
pyenv global 3.6.8 # set global
pyenv local 3.6.8 # set local
pyenv shell 3.8-dev # set shell

Virtual environment

python3 -m venv venv # create
# or
python3 -m venv venv --without-pip # if above throws segmentation error
source venv/bin/activate # activate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment