Pip with Python 2.7 and 3.4 on Windows Machine

五迷三道 提交于 2019-12-08 08:15:58

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!