Conda创建了一个Envriont py3.7,只安装了jupyter,但发现了冲突

2024-09-27 17:52:07 发布

您现在位置:Python中文网/ 问答频道 /正文

当我创建这样一个新环境: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

我在谷歌上搜索过,但似乎没有人像我一样有这个问题。为什么这会发生在我身上

求你了,我需要帮助


Tags: httpspackageversionjupyteranacondacncondausers
2条回答

多亏@merv,在他的帮助下,我找到了清华水蟒镜中的问题。我已经向他们报告了这件事。他们在MacOS中使用CONDA_SUBDIR="win-64"命令来重现这一点

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

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

我认为这一发现将有助于遇到类似奇怪的依赖冲突的人

相关问题 更多 >

    热门问题