List all Virtual Environments in Python
A simple method exists for identifying all virtual environments that have been created using the virtualenv package in Python.
On the Linux command line, enter the following:
find ~ -type f -name "activate" -exec egrep -l nondestructive /dev/null {} \; 2>/dev/null
This will provide a list of all of the folders that are linked to virtual environments. For example, here is the output on my system:
amdimech@adonline:~$ find ~ -type f -name "activate" -exec egrep -l nondestructive /dev/null {} \; 2>/dev/null
/home/amdimech/PlantCV-4.5.1/bin/activate
/home/amdimech/tensorflow/bin/activate
/home/amdimech/PlantCV-4.0.1/bin/activate
Comments
No comments have yet been submitted. Be the first!