4 ms·
pyenv, pyenv virtualenv (built-in to pyenv) and pip. - Install pyenv (curl https://pyenv.run https://pyenv.run | bash) - Install python version(s) with pyenv
by dhruvkar 6y ago
pyenv, pyenv virtualenv (built-in to pyenv) and pip.
- Install pyenv (curl https://pyenv.run https://pyenv.run | bash)
- Install python version(s) with pyenv (pyenv install 3.7.3)
- Create virtualenv with pyenv virtualenv. (pyenv virtualenv <version> <name-to-give-it>)
- Create a directory with the same name (mkdir <name-to-give-it>)
- cd into it and do pyenv local <name-to-give-it> for auto activating virtualenvs.
- Install packages with pip.
This isn't the most elegant solution available, but it keeps everything nice and segregated.
edited to add clarity