50 likes | 56 Views
Sometimes you may need to list all virtual environments in Python. Here is how to view all virtual environments in python. #python #virtualenv<br><br>Visit https://techimbo.com/how-to-list-all-virtual-environments-in-python/
E N D
How to List All Virtual Environments in Python
Using lsvirtualenv You can use lsvirtualenv command for this purpose, if you are using virtualenvwrapper. It provides two options – long for detailed information and brief for summarized information. $ lsvirtualenv -b # for brief $ lsvirtualenv -l # for long This command works if you are using virtualenvwrapper, which is a wrapper for virtualenv command used to manager virtual environments in python. It may not work with virtualenv, or even venv present by default in Python 3+.
Using workon By default, developers use virtualenv command to install, activate and deactivate virtual environments. It provides a command workon that you can use to activate virtual environments. You can also use the same command without any arguments to list all virtual environments. $ workon Alternatively, you can also use locate command to find the activate script present in each virtual environment. $ locate -b '\activate' | grep "/home"
Using Conda If you are using Anaconda distribution of Python, you can use conda command to get a list of all virtual environments on your system. $ conda info --envs # or $ conda info -e # or $ conda env list
Thank You Visit for details https://techimbo.com/how-to-list-all-virtual-environments-in -python/