How to list all Python virtual environments on Linux?

I have more than one Python environment configured on my Debian operating system. Is there a way to list all configured environments in Linux?

This is different from a possible duplicate, as indicated in the comment below. I mean virtual environments created using only virtualenv.

+12
source share
1 answer

If you use only virtualenv ...{directory}to create virtualenv, then there is only some directory somewhere that has a specific environment in it. You can only "list" them by running findin your directory $HOME(or any other directory list that you could use to create virtualenvs) by looking for python installations. It would be hoped that some agreements were respected, as was their preservation in ~/virtualenvs. (See Also Where should virtual machines be created? )

If you use virtualenvwrapper, then, as already mentioned, use the command lsvirtualenvto display the envs created with mkvirtualenv. By default, they are all in ~/.virtualenvs. See https://virtualenvwrapper.readthedocs.io/en/latest/command_ref.html

conda, envs, conda create --name {my_env} [...], conda info --envs, conda env list. . https://conda.io/docs/using/envs.html#list-all-environments

+17

Source: https://habr.com/ru/post/1656073/


All Articles