Conda 尝试将大型默认库安装到新环境中

Conda attempts to install a large default library into new environments

我在 Mac 上全新安装了 Anaconda (https://www.continuum.io/downloads#all)。然后我尝试 运行 conda create --name test 创建一个新的虚拟环境。它想要安装 很多 个默认包:

cffi:           1.2.1-py27_0  defaults
cryptography:   1.0.2-py27_0  defaults
cssselect:      0.9.1-py27_0  defaults
enum34:         1.1.1-py27_0  defaults
idna:           2.0-py27_0    defaults
ipaddress:      1.0.14-py27_0 defaults
libxml2:        2.9.2-0       defaults
libxslt:        1.1.28-2      defaults
lxml:           3.5.0-py27_0  defaults
nose:           1.3.7-py27_0  defaults
openssl:        1.0.2d-0      defaults
pip:            7.1.2-py27_0  defaults
pyasn1:         0.1.9-py27_0  defaults
pycparser:      2.14-py27_0   defaults
pyopenssl:      0.15.1-py27_1 defaults
python:         2.7.11-0      defaults
queuelib:       1.2.2-py27_0  defaults
readline:       6.2-2         defaults
scrapy:         1.0.3-py27_0  defaults
setuptools:     19.1.1-py27_0 defaults
six:            1.10.0-py27_0 defaults
sqlite:         3.8.4.1-1     defaults
tk:             8.5.18-0      defaults
twisted:        15.5.0-py27_0 defaults
w3lib:          1.12.0-py27_0 defaults
wheel:          0.26.0-py27_1 defaults
zlib:           1.2.8-0       defaults
zope.interface: 4.1.3-py27_0  defaults

我不知道这些是从哪里来的。此外,因为 scrapy 只是 Python 2.x,所以 conda 在尝试创建新的 Python 3.x 环境时会自动失败(通过 conda create --name test python=3.5):

Hint: the following packages conflict with each other:
    - python 3.5*
    - scrapy

我过去遇到过这个错误(参见 ). At the time I had assumed that there was something wrong on my end, perhaps with my Python install. Now I'm not so sure: the Anaconda install on my machine is literally minutes old, and the exact same install on my PC went off without this hitch (albeit with a different one: )。在这种情况下,如预期的那样,在新环境中安装的唯一东西是 msvc_runtimepippythonsetuptoolswheel

我应该怎么做才能尝试调试?

您提供的命令应该会失败,但您似乎设置了默认包:

msarahan@0109-msarahan-2  ~  conda create --name test
Error: too few arguments, must supply command line package specs or --file

You can specify one or more default packages to install when creating
an environment.  Doing so allows you to call conda create without
explicitly providing any package names.

To set the provided packages, call conda config like this:

conda config --add create_default_packages PACKAGE_NAME

要取消设置这些默认包,请查看您的 ~/.condarc

编辑:uninstalling/reinstalling Anaconda 或 Miniconda 时不会删除 .condarc。这是好是坏。它会保存您的设置,但与此同时,很难进入 "clean" 状态。