Skip to content

Instantly share code, notes, and snippets.

@hanifa2102
Created August 15, 2022 08:22
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 hanifa2102/e3edaaba637d0985376dcb208282aba0 to your computer and use it in GitHub Desktop.
Save hanifa2102/e3edaaba637d0985376dcb208282aba0 to your computer and use it in GitHub Desktop.
PyEnv /Venv Commands
# Track which python to use for diff projs
pyenv install -l
pyenv install <python-version>
#Local (for folder specific) or Global Python
pyenv local 3.10.6
pyenv global 3.7.1
# Track which pip packages for diff projs
python -m venv .venv
.venv\Scripts\activate
@hanifa2102
Copy link
Author

hanifa2102 commented Aug 16, 2022

Jupyter

#Link venv kernel to jupyter notebook
ipython kernel install --user --name=venv
#Unlink
jupyter-kernelspec uninstall venv

@hanifa2102
Copy link
Author

VS code integration (Cntrl+ Shift + P) | workspace setting

settings.json => {
"python.terminal.activateEnvironment": true
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment