Preventing global package install with `PIP_REQUIRE_VIRTUALENV`
Posted on 05 Nov, 2021
To make sure you have an virtual env activated whenever you do pip install
, add the following line to your .bashrc
If you now try to install packages outside a virtual environment pip
will remind you.
In some cases you will need to install global packages (like vim plugins etc). For that create a separate bash function like this
Last updated