How can I switch using pip between system and anaconda

Now I use anaconda pip after I installed pip with "conda install pip", if I want to use system pip again, how to do it? Or how can I switch the system pip to anaconda pip?

+6
source share
2 answers

Most likely, anaconda automatically edited your .bashrc so that anaconda / bin is in front of your /usr/bin in your $PATH variable. To verify this, enter echo $PATH and a list of directory paths will be displayed on the command line. Your computer checks each of these places for pip when you type pip at a command prompt. It executes the first one found in your PATH .

You can open /home/username/.bashrc any text editor. Wherever he adds anaconda / bin to the path, with something like export PATH=/anaconda/bin:$PATH , just replace it with export PATH=$PATH:/anaconda/bin

Please note that this will change your OS to use your system python. Instead, you can always just use the direct path to pip when calling. Or you can use it with alias pip=/path/to/system/pip . And you can put this line in your .bashrc file to apply it whenever you log in to your PC.

+2
source

You do not need to change your path. Just use the full path to the system pipeline (usually /usr/bin/pip or /usr/local/bin/pip ) to use the system pip.

+1
source

All Articles