On my Linux
box I have python 2.x and 3.x. I have to install some module like request
only on python 3.x.
How i can force pip
to install module for only python 3.x?
I tried command pip install requests
then it install on python 2.x not 3.x
I have to keep both version of python due to some old script so I can not get rid of completely python 2.x
CodePudding user response:
Running pip3 install
should cover this. Or you can run python3 -m pip install
, to call the pip module instead of the executable.
CodePudding user response:
Have you tried using "pip3" command? This can be installed with apt-get install python3-pip. Pip3 is the same as pip, but only works with python3
CodePudding user response:
You have to use pip3
instead or pip
.
pip3
refers to Python 3.x and pip
to Python 2.x