pyenv virtualenv

41

# 1. Create a virtualenv using the foremost version of pyenv global (3.8.2 in our case)
pyenv virtualenv my-venv

# 2. Set the virtualvenv to your project directory using pyenv local
cd YOUR_PROJECT_DIR && pyenv local my-venv

# 3. Install whatever you want with either pip or poetry
pip install -r requirements.txt
poetry install

# 4. If/when done with the env, delete it with pyenv virtualenv-delete
pyenv virtualenv-delete my-venv
$ pyenv virtualenv 2.7.16 apps2
$ pyenv virtualenv 3.7.4 apps3

Comments

Submit
0 Comments