问题
I have both Python 2.7 and 3.4 on my Windows machine. I have pip, pip2, and pip3. Pip2 is 2.7 while the others are 3.4 when running pip(,2,3) -V
However, pip -V
, pip2 -V
and pip3 -V
All show the same thing about pips location and all but pip2 show that it's for Python3.4. For all three the location they show for pip is C:\Python27\site-packages. Which is fine for pip2, but for pip3, and pip(if posssible, not 100% necessary), they should show the location as C:\Python34 instead. Not sure why this happens. But when I install things with pip3, they end up in C:\Python27\site-packages rather than C:\Python34\site-packages\etc.etc. This is an annoyance, how can I set this up correctly so it works the way I need?
回答1:
By using --ignore-installed with pip, I was able to overcome these issues. By recreating shortcuts and such it works fine now. Seems that with two version of python you must take extra care in setup and PYTHONPATH or these isssue occur.
来源:https://stackoverflow.com/questions/29798334/pip-with-python-2-7-and-3-4-on-windows-machine