how avoid Anaconda to hijack pip

谁说胖子不能爱 提交于 2020-01-05 04:30:06

问题


I have 2 versions of Python installed on my PC (Windows 7, 64Bit). Python 2.7 Version installed with Anaconda Python 3.6 Version installed directly from python.org (the "regular IDLE")

Now, i would like to install the necessary packages on the 3.6 using pip, but anaconda keeps on hijacking the command.

For example, on typing in the cmd window:

pip install numpy

and i get:

Requirement already satisfied: numpy in c:\users\georges\anaconda2\lib\site_packages

Which is the case for python2.7, but i was trying to install it for version 3.6 installed without Anaconda. I tried re-installing pip hoping it would erase the hijacking by Anaconda2 ... failed. I am contemplating to remove Anaconda2 altogether although i risk that in windows, removing a programme does not necessaraly remove the dependencies.

Any lead please ?


回答1:


I think what you are looking for is pip3 install pip3 and you should be able install packages for python3

It should come as standard with python3 installation setup.

First check if it is there with

where pip3

For any further issues check this post

You don't need to uninstall anaconda2. Both python versions can co-exist and libraries different managed by different package installers pip for python 2 and pip3 for python 3 respectively.

Hope this answers your question.




回答2:


Install it with pip3, because you want it for python 3:

pip3 install numpy


来源:https://stackoverflow.com/questions/44460422/how-avoid-anaconda-to-hijack-pip

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