【问题标题】:Getting a series of errors when trying to update Conda and Python尝试更新 Conda 和 Python 时出现一系列错误
【发布时间】:2023-01-21 11:24:43
【问题描述】:

我很长一段时间都没有更新我的 conda 安装。它是 4.1-ish 版本,运行 Python 3.5.2。我最终决定切换到 Python 3.9,但我在更新所有内容时遇到了一些麻烦。我开始运行像这样的命令

conda update conda
conda update anaconda
conda update python
conda update -all

反复并取得了相当大的进步,但最终康达达到了稳定状态,不会再进一步​​了。

现在我有 conda 版本 4.5.11 和 python 3.5.6。当我运行conda update condaconda update -n base -c defaults conda 时,它返回

==> WARNING: A newer version of conda exists. <==
  current version: 4.5.11
  latest version: 4.13.0

但随后不安装它。

当我尝试 conda install conda=4.13.0 时,我得到

Solving environment: failed

UnsatisfiableError: The following specifications were found to be in conflict:
  - conda=4.13.0
  - pymc
Use "conda info <package>" to see the dependencies for each package.

同样,当我尝试 conda install python=3.9conda install python=3.7 时,它给了我

UnsatisfiableError: The following specifications were found to be in conflict:
  - healpy -> python=3.5 -> libffi=3.2
  - healpy -> python=3.5 -> openssl=1.0
  - healpy -> python=3.5 -> readline=7
  - python=3.9

UnsatisfiableError: The following specifications were found to be in conflict:
  - _nb_ext_conf -> python=3.5
  - python=3.7

我可以通过 conda remove pymcconda remove healpy 让 3.9 工作吗?那会破坏什么吗?有没有更好的方法来升级conda/anaconda/python?

更新:我执行了conda remove pymc,然后再次尝试了conda install conda=4.13.0。现在我明白了

UnsatisfiableError: The following specifications were found to be in conflict:
  - conda=4.13.0 -> python[version='>=3.7,<3.8.0a0'] -> openssl[version='>=1.1.1b,<1.1.2a']
  - python=3.5

【问题讨论】:

  • 使用conda create -n py39 python==3.9 创建新环境是否有效?对于 conda install python=3.9 将实现的目标有点困惑。
  • 创建新环境似乎已经下载了python 3.9。但是,现在我的 jupyter notebooks 无法在任何环境中工作。我在单元格上单击运行,但没有任何反应。

标签: python python-3.x anaconda conda


【解决方案1】:

我最近遇到了同样的问题。 虽然这不完全是一个解决方案,但安装一个全新的 Anaconda 发行版对我来说很有用:

  1. 访问 Anaconda's oficial website 并下载适用于 Linux 的 Python 3.9 64 位安装程序。
  2. 在开始新安装之前,您可以备份以前的环境 (see this reference) 并稍后恢复。
  3. 如果您对丢失以前的环境没有信心,可以复制您的.bashrc文件.bash_profile文件并为新发行版选择不同的安装路径。

【讨论】:

    猜你喜欢
    • 2018-08-14
    • 1970-01-01
    • 1970-01-01
    • 2014-09-21
    • 2015-07-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多