我试图在condacreate创建的虚拟环境中pip安装一些python库,但是对于某些包,安装被停留在“安装收集的包:。 以熊猫为例: 我的命令和输出如下:
pip install pandas --no-cache-dir
Collecting pandas
Downloading https://files.pythonhosted.org/packages/99/12/bf4c58eea94cea4f91ff931f284146337814fb8546e6eb0b52584446fd52/pandas-0.24.1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (16.3MB)
100% |████████████████████████████████| 16.3MB 11.4MB/s
Requirement already satisfied: numpy>=1.12.0 in /anaconda/envs/testctds2/lib/python3.6/site-packages (from pandas) (1.16.1)
Requirement already satisfied: pytz>=2011k in /anaconda/envs/testctds2/lib/python3.6/site-packages (from pandas) (2018.9)
Requirement already satisfied: python-dateutil>=2.5.0 in /anaconda/envs/testctds2/lib/python3.6/site-packages (from pandas) (2.8.0)
Requirement already satisfied: six>=1.5 in /anaconda/envs/testctds2/lib/python3.6/site-packages (from python-dateutil>=2.5.0->pandas) (1.12.0)
Installing collected packages: pandas
这个过程就一直挂在那里(至少30分钟),直到我control+z退出(control+c没有响应)。在
我所做的:
conda安装熊猫效果很好,这也是推荐的安装熊猫的方式。我只是不明白为什么pip install不能正常工作,这是假定的,这种情况也发生在其他一些库上,比如numpy、scipy和scikitlearn。
我也尝试不使用--no cache dir或-vvv来查看更多详细信息,但是在任何一种情况下,“安装收集的包:pandas”
我在一个新的终端窗口中尝试了这个命令。神奇的是,numpy可以通过“pip install numpy”快速安装,但它不能与pandals或scipy一起使用。
我知道这可能是其他用户遇到的问题。这是一个描述相同问题的github link。在Conda GitHub页面上还有一些其他的。从这篇文章中得到的一些答案是:
确保您的根conda环境是最新的。尝试:
conda upgrade conda
创建一个全新的虚拟环境
Micheal Grant是Anaconda公司技术咨询部的主管,他在回复这篇帖子时说:
相关问题 更多 >
编程相关推荐