Home · RSS · E-Mail · GitHub · GitLab · Twitter · LinkedIn

Python bits

first published:

» pip

Remove all packages to get a somewhat clean system (e.g. when you forgot to use a virtual environment, like I did…):

1
pip freeze > requirements.txt && pip uninstall -r requirements.txt -y

or without creating a requirements.txt.

1
pip uninstall -y -r <(pip freeze)

Credits to Giorgos Myrianthous

» venv

Create a virtual environment:

1
python3 -m venv venv/

Activate the environment:

1
source venv/bin/activate

Just normally install packages in the virtual environment:

1
pip install ...

Deactivate the environment:

1
deactivate



Home · RSS · E-Mail · GitHub · GitLab · Twitter · LinkedIn