Python Pip Installing for Wrong Version

2019-08-15 17:25发布

问题:

I know this question has been asked before, but my issue is a bit different. I have both pip2.7 installed and working and pip3.4 installed and working (with my Python 2.7 and 3.4 versions), but my pip2.7 is installing in the wrong directory (it is installing in the 3.4 folder).

As you can see, I have both versions working, and from everything else I've read online these should point to my two different versions of Python, yet they are pointing to the same directory. I can't find anything about manually changing where pip2.7 is pointing. Thanks!

回答1:

I'd suggest to uninstall and reinstall pip. Do so by running

pip uninstall pip

Download the get-pip.py bootstrapper from https://bootstrap.pypa.io/get-pip.py and run

python2.7 get-pip.py

or

python3.4 get-pip.py

respectively.