康达仅安装jupyter创建环境py3.7,但发现冲突

时间:2020-02-05 17:13:10

标签: python python-3.x jupyter-notebook anaconda conda

当我创建像这样的新环境:conda create -n nb python=3.7 jupyter时,它失败了。

控制台告诉我:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.-
Examining jupyter: 100%|████████████████████████████████████████████████failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package python conflicts for:
python=3.7
jupyter -> python[version='2.7.*|3.4.*|3.5.*|3.6.*|>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.8,<3.9.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']
jupyter -> ipywidgets -> python[version='>=3.5']

所以我去了基本环境检查安装的软件包的版本。 (base) D:\>conda list

python版本是3.7.4,而jupyter是1.0.0。所以我再次尝试。 conda create -n nb python=3.7.3 jupyter=1.0.0

但是,它仍然无法工作。我很困惑为什么?

这里是conda info

     active environment : base
    active env location : C:\ProgramData\Anaconda3
            shell level : 1
       user config file : C:\Users\Administrator\.condarc
 populated config files : C:\Users\Administrator\.condarc
          conda version : 4.8.2
    conda-build version : 3.18.9
         python version : 3.7.4.final.0
       virtual packages :
       base environment : C:\ProgramData\Anaconda3  (writable)
           channel URLs : https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/win-64
                          https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/noarch
          package cache : C:\ProgramData\Anaconda3\pkgs
                          C:\Users\Administrator\.conda\pkgs
                          C:\Users\Administrator\AppData\Local\conda\conda\pkgs
       envs directories : C:\ProgramData\Anaconda3\envs
                          C:\Users\Administrator\.conda\envs
                          C:\Users\Administrator\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.8.2 requests/2.22.0 CPython/3.7.4 Windows/10 Windows/10.0.18362
          administrator : True
             netrc file : None
           offline mode : False

我用Google搜索,但似乎noboday遇到了像我这样的问题。为什么这只发生在我身上。

请,我需要一些帮助。

2 个答案:

答案 0 :(得分:0)

感谢@merv,在他的帮助下,我找到了问题所在,是“清华蟒蛇镜”。我已经向他们报告了。他们在MacOS中使用CONDA_SUBDIR="win-64"命令来重现此内容。

问题页面: https://github.com/tuna/issues/issues/701

答案 1 :(得分:0)

进一步的调查表明,根本原因是/pkgs/msys2文件的default_channels:中缺少.condarc通道,这导致找不到包m2w64-gcc-libs,然后可能会使软件包混淆。康达依赖解析器。

我希望这一发现能帮助遇到类似奇怪的依赖性冲突的人们。