How do I create a virtual environment using pyenv?
-
Also see:
pyenv help
How do I install the python multiple version management tool pyenv?Create a virtual environment using pyenv, using version 3.8-dev of python.
$ pyenv virtualenv 3.8-dev eng_update Looking in links: /tmp/tmpdocrlo65 Requirement already satisfied: setuptools in /home/trainer/.pyenv/versions/3.8-dev/envs/eng_update/lib/python3.8/site-packages (49.2.1) Requirement already satisfied: pip in /home/trainer/.pyenv/versions/3.8-dev/envs/eng_update/lib/python3.8/site-packages (20.2.3)
Activate the environment and Check some commands. Note that
local
here is the name of your work directory and not the version of python.$ pyenv local eng_update (eng_update) $ pyenv which python /home/trainer/.pyenv/versions/eng_update/bin/python (eng_update) $ pyenv which pip /home/trainer/.pyenv/versions/eng_update/bin/pip (eng_update) $
© Lightnetics 2024