Is there any way to make pip
play well with multiple versions of Python? For example, I want to use pip
to explicitly install things to either my s
If you have both python3.6
and python3.7
installed and want to use pip
with python3.7
by default, here's what you should do:
First make sure you have pip
installed for python3.7
python3.7 -m pip install -U pip
Now pip3.7
must be available, so we edit .bashrc
nano ~/.bashrc
adding the following line to it
alias pip=pip3.7
In order for the changes to take effect type in the shell:
source ~/.bashrc
Now if you type:
pip --version
you should get:
pip 20.1.1 from /usr/local/lib/python3.7/dist-packages/pip (python 3.7)
which means, if you use, for example:
pip install
it would install the
for python3.7