python virtualenv
How
- install pip
-
install virtualenv
python3.11 -m pip install virtualenv
-
mkdir for new project (e.g.,, ‘myproject’)
mkdir myproject cd myproject
-
create virtualenv (named ‘myproject’)
virtualenv myproject
-
activate virtualenv (‘myproject’)
source ./bin/activate
-
install stuff using pip, e.t.c.,
python3.11 -m pip install ...
-
All installed libraries are located at: ./lib/python***/site-packages
-
deactivate virtualenv
deactivate
-
if you to delete the entire virtual environment
sudo rm -rf myproject
Source
- https://stackoverflow.com/questions/35017160/how-to-use-virtualenv-with-python