1

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).

enter image description here

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!

5
  • is PYTHONPATH set? Commented Sep 9, 2015 at 8:16
  • @cel I have my Python directory in my PATH variable. Does that effectively do the same thing or do I need to add a separate variable as PYTHONPATH? I can run python2.7 and python from my command line and both run. Commented Sep 9, 2015 at 8:24
  • The best way to avoid this kind of problem is to use virtualenv docs.python-guide.org/en/latest/dev/virtualenvs Commented Sep 9, 2015 at 8:47
  • @JennerFelton, no there's a specific environment variable named PYTHONPATH. It's important for your question to know, if this variable is set. And if so, what value it has. Commented Sep 9, 2015 at 10:54
  • I suggest uninstalling both versions and then using conda to install them into different environments Commented Sep 24, 2017 at 4:25

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

And I installed pip with python3 and it STILL installed packaged under python2.7
Hey @dave-appleton, is there a pip3 command available? If so, you could either use it right away or, for convenience, redirect the pip symlink to this binary (assuming you use some UNIX derivate).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.