Open ns-rse opened 7 months ago
Random I came across to prevent installing anything with pip outside of a virtual environment.
pip config set global.require-virtualenv True
Creates the file ~/.config/pip/pip.conf with the contents
~/.config/pip/pip.conf
[global] require-virtualenv = True
And pip should then complain if you try to pip install outside of a virtualenv.
pip
Apparently you can set the PIP_REQUIRE_VIRTUALENV=true in your .zshrc or .bashrc too.
PIP_REQUIRE_VIRTUALENV=true
.zshrc
.bashrc
I wonder if there is similar to prevent installation in the base conda environment. :thinking:
Random I came across to prevent installing anything with pip outside of a virtual environment.
Creates the file
~/.config/pip/pip.conf
with the contentsAnd
pip
should then complain if you try to pip install outside of a virtualenv.Apparently you can set the
PIP_REQUIRE_VIRTUALENV=true
in your.zshrc
or.bashrc
too.I wonder if there is similar to prevent installation in the base conda environment. :thinking: