Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 1
    As mentionned in a comment to another answer: it's even easier to use the provided pyenv-virtualenv with pyenv (cf realpython.com/intro-to-pyenv/#virtual-environments-and-pyenv ) Commented Dec 1, 2020 at 11:01
  • I had to run a pyenv shell for the selected python version: pyenv shell 3.11.3 and then run python -m venv env to create the virtual environment. This creates a virtual environment with the name env that uses python 3.11.3. To install python versions use pyenv install 3.11.2. And in order to use the shell you might need to follow prompted configuration steps when using it for the first time with the command pyenv shell 3.11.3. Commented Apr 19, 2023 at 20:57