This question already has an answer here:
- List all virtualenv 4 answers
I have more than one Python environment configured in my Debian OS. Is there a way to list all configured environments in Linux?
This is different from the possible duplicate as indicated in the comment below. I mean virtual environments created using virtualenv
only.
If only using the lowly
virtualenv ...{directory}
to create a virtualenv, then there is just some directory somewhere that has that specific environment in it. You can only "list" these by runningfind
on your$HOME
directory (or any other list of directories you might have used to create virtualenvs) looking for python installations. Hopefully some convention was followed like storing them all in~/virtualenvs
. (See also Where should virtualenvs be created? )If using
virtualenvwrapper
, then as mentioned, use the commandlsvirtualenv
to list envs that were created withmkvirtualenv
. They are all in~/.virtualenvs
by default. See https://virtualenvwrapper.readthedocs.io/en/latest/command_ref.htmlIf using
conda
, you can list virtual envs created viaconda create --name {my_env} [...]
, using eitherconda info --envs
orconda env list
. See https://conda.io/docs/using/envs.html#list-all-environments