Created How to create a virtualenv and activate it immediately in a script (markdown)

Ryan Boehning
2020-11-18 13:33:09 -08:00
parent 62dad1fc82
commit 4fab4161d2

@@ -0,0 +1,10 @@
```bash
# PROBLEM
pyenv virtualenv 3.9.0 foo-3.9.0
poetry install # won't install packages to the new virtualenv!
# SOLUTION
pyenv virtualenv 3.9.0 foo-3.9.0
export VIRTUAL_ENV="$(pyenv virtualenv-prefix)/envs/foo-3.9.0"
poetry install # installs packages to the new virtualenv
```