Conda, Pip, Virtualenv and Pyenv: Commands Compared
Last updated:Table of Contents
- Create environment
- Create environment in specific folder
- Create environment with specific python version
- List environments
WIP Alert This is a work in progress. Current information is correct but more content may be added in the future.
Create environment
Conda | Virtualenv | Pyenv |
---|---|---|
$ conda create --name my-env |
$ virtualenv my-env |
$ pyenv virtualenv my-env |
Environment directory will be created in envs/ , in your conda directory. |
Environment will be created in the current working directory |
Envs are stored under ~/.pyenv/versions/ |
Create environment in specific folder
Conda | Pyenv |
---|---|
$ conda create --prefix /path/to/folder |
NOT AVAILABLE |
Create environment with specific python version
Conda | Pyenv |
---|---|
$ conda create -n "my-venv" python=3.9.16 |
$ pyenv virtualenv 3.9.16 my-venv |
List environments
Conda | Pyenv |
---|---|
$ conda info --envs |
$ pyenv virtualenvs |