我正在尝试使用Python = 3.4设置Anaconda环境。
(base) C:\WINDOWS\system32>conda create -n py34 version=3.4
我已经包含了conda-forge频道,但仍然收到此错误:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- version=3.4
Current channels:
- https://repo.anaconda.com/pkgs/main/win-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-64
- https://repo.anaconda.com/pkgs/msys2/noarch
- https://conda.anaconda.org/conda-forge/win-64
- https://conda.anaconda.org/conda-forge/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
当我尝试以下方法时:
(base) C:\WINDOWS\system32>conda create -n py34 python=3.4 -c conda-forge
我得到:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed
UnsatisfiableError: The following specifications were found to be incompatible with each other:
Package vc conflicts for:
python=3.4 -> vc=10
Package pip conflicts for:
python=3.4 -> pip
Package vs2010_runtime conflicts for:
python=3.4 -> vs2010_runtime
我对Anaconda和Python还是陌生的,不知道要搜索什么。
这篇文章:this blog还是没有帮助。
答案 0 :(得分:4)
首先,您可以通过增加create
命令的详细程度来提供更多详细信息,该命令将提供有用的调试消息。每个-v
的详细程度从INFO
到DEBUG
到TRACE
。我通常总是使用DEBUG
,因为我讨厌看到它在解决环境时就坐在那里。
conda create -v -v -v -n py34 python=3.4
我不认为您需要添加conda-forge
,第一个命令的问题是您没有指定python=3.4
,而是做了version=3.4
。尝试不使用conda-forge
,而改为使用python=3.4
。
您的conda好像也坏了,无法解决可能无法解决问题的环境。尝试使用
解决该问题conda update --all
如果您仍然遇到相同的问题,请使用以下命令查看冲突
conda info vc
conda info pip
conda info vs2010_runtime
我相信您的基础中的某些软件包有可能与3.4
不兼容。在这种情况下,您可以尝试在没有任何默认软件包的情况下进行安装
conda create --no-default-packages -n py34 python=3.4
如果仍然遇到问题,则可能是配置文件有些混乱,所以我会尝试在Windows上 complete 卸载anaconda。然后再尝试一次。
答案 1 :(得分:2)
好吧,三天后,我发现最新版本的Anaconda有点破了。我将版本降级为4.6.14,现在一切正常。
conda config --set allow_conda_downgrades true
conda install conda=4.6.14