I am now using anaconda pip after I installed pip by "conda install pip", if I want to use system pip again, how can I make it? Or how can I switch system pip to anaconda pip?
pip is the standard package manager for python, meaning you can use it both inside and outside of Anaconda.
The fundamental difference between pip and Conda packaging is what they put in packages. Pip packages are Python libraries like NumPy or matplotlib . Conda packages include Python libraries (NumPy or matplotlib ), C libraries ( libjpeg ), and executables (like C compilers, and even the Python interpreter itself).
Odds are that anaconda automatically edited your .bashrc
so that anaconda/bin is in front of your /usr/bin
folder in your $PATH
variable. To check this, type echo $PATH
, and the command line will return a list of directory paths. Your computer checks each of these places for pip when you type pip in the command line. It executes the first one it finds in your PATH
.
You can open /home/username/.bashrc
with whatever text editor you choose. Wherever it adds anaconda/bin to the path, with something like export PATH=/anaconda/bin:$PATH
, just replace it with export PATH=$PATH:/anaconda/bin
Note though, this will change your OS to use your system python as well. Instead of all of this, you can always just use the direct path to pip when calling it. Or you can alias it using alias pip=/path/to/system/pip
. And you can put that line in your .bashrc file in order to apply it whenever you login to the pc.
You don't need to change your path. Just use the full path to the system pip (generally /usr/bin/pip
or /usr/local/bin/pip
) to use the system pip.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With