2

我正在尝试在conda create创建的虚拟环境中pip安装一些python库,但是对于某些包,安装卡在步骤“安装收集的包:。以pandas为例:我的命令和输出如下:

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 没有响应)。

我试过的:

  1. conda install pandas 运行良好,这也是安装 pandas 的推荐方式。我只是不明白为什么 pip install 不起作用,因为它假设并且这种情况也发生在其他一些库中,例如 numpy、scipy 和 scikit-learn。

  2. 我也尝试不使用 --no-cache-dir 或 -vvv 来查看更多详细信息,但在任何一种情况下,“安装收集的软件包:pandas”行之后都没有更多信息或错误代码

  3. 我在新的终端窗口中尝试了该命令。神奇的 numpy 可以通过“pip install numpy”快速安装,但它不适用于 pandas 或 scipy。

4

1 回答 1

1

我看到这可能是其他用户遇到的问题。这是描述相同问题的github 链接。Conda GitHub 页面上还有其他一些。来自该帖子的一些答案是:

  • 确保您的根 conda 环境是最新的。尝试:conda upgrade conda

  • 创建一个全新的虚拟环境

Anaconda 技术咨询总监 Micheal Grant 回复了这个帖子:

也就是说,当我查看调试输出时,我发现它无法很好地修剪包列表。它必须考虑的“旧”包越多,发生这种求解器失速的可能性就越大。值得庆幸的是,它的可能性比以前小得多。

于 2019-02-14T21:45:32.563 回答