【问题标题】:I can not install tensorflow and keras with anaconda我无法使用 anaconda 安装 tensorflow 和 keras
【发布时间】:2020-08-24 23:54:59
【问题描述】:

我刚刚安装了 anaconda 的个人版。之后我立即进入 base(root) 环境安装 tensorflow 和 keras,因为我需要它们用于项目,遗憾的是我无法安装它们。

通过 anaconda 导航器应用程序手动尝试安装 tensorflow,我收到以下错误

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - tensorflow -> python[version='3.5.*|3.6.*|3.7.*']

Your python: python=3.8

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

The following specifications were found to be incompatible with your CUDA driver:

  - feature:/win-64::__cuda==11.0=0
  - feature:|@/win-64::__cuda==11.0=0

Your installed CUDA driver is: 11.0

我在尝试安装 keras 时遇到了类似的错误。从解释中我了解到 python 3.8 不支持这些包?在这种情况下,我该怎么办?我需要能够使用这些库。

任何帮助将不胜感激。提前致谢!

【问题讨论】:

  • 您是否需要任何仅适用于 python 3.8 的软件包?如果没有,也许考虑将你的 python 降级到 3.7
  • 我不介意那样做。我刚刚安装了 anaconda,它会自动随 python 3.8 一起提供。知道我是否可以降级基本环境正在使用的python?
  • 降级。 conda 和 venv 的全部目的是创建虚拟环境。
  • 我应该降级还是使用 3.7 python 创建一个新环境?
  • 在您当前的环境中运行conda install python=3.7,或者只是启动一个新环境。

标签: python tensorflow keras anaconda conda


【解决方案1】:

我遇到了类似的问题。不得不回到python 3.7。还有留言

Your installed CUDA driver is: 11.0

我认为引用的不是您的 CUDA 版本,而是您的 GPU 卡的驱动程序。查看已安装的模块并确保您使用的是 CUDA 10.1 和 cuDNN 7.6.5。文档在这里。至于 GPU 驱动程序,我必须去 Nvidia 网站找到与 CUDA 10.1 兼容的旧驱动程序。你现在可能会认为 Tensorflow 的人会提供这个建议。

【讨论】:

  • 嘿,非常感谢您的回答和信息!我最终决定创建一个安装 3.7.7 python 的新环境。在这之后,我在这个环境下下载了tensorflow和keras,看起来运行的很完美。唯一改变的是,当我打开导航器时,我选择“ 上的应用程序,然后从那里运行 jupyter。令我惊讶的是,我不得不在这个新环境中再次安装 jupyter。这正常吗?还是我在某个地方犯了错误?提前致谢。
  • 正常。每次创建新环境时,都必须安装 jupyter 或 spyder 等应用程序。
  • 好的,非常感谢您提供的信息。我很感激,祝你有美好的一天。
猜你喜欢
  • 1970-01-01
  • 2018-05-02
  • 2022-08-19
  • 2018-12-28
  • 2022-01-19
  • 2021-03-13
  • 2019-06-11
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多