【问题标题】:Tensorflow issues when downloading and importing下载和导入时的 TensorFlow 问题
【发布时间】:2020-01-25 12:49:25
【问题描述】:

我正在尝试更准确地使用 tensorflow keras,但它使用了 tensorflow 后端。我必须将我的 python 转换为 3.6.2 才能下载 tensorflow,即使它在我去导入时安装它也不起作用说:

ModuleNotFoundError:没有名为“tensorflow”的模块

所以我尝试安装 Anaconda 并执行此输入:

conda create -n tensorflow_cpu pip python=3.6 #also tried with just tensorflow
activate tensorflow_cpu
pip install --ignore-installed --upgrade tensorflow

然后我得到这个错误:

错误:找不到满足要求 tensorflow_cpu 的版本(来自版本:无) 错误:没有找到 tensorflow_cpu 的匹配分布

所以现在我完全被卡住了。为什么只导入一个模块就这么难。为什么 tensorflow 没有努力使其与较新版本的 python 一起工作。我正在尝试执行机器学习项目,但这个问题极大地打击了我的积极性,让我远离了这一切。

如果有人有解决方案或理由,请让我知道这很简单,以便我可以彻底遵循。感谢您的宝贵时间。

【问题讨论】:

  • 你从tensorflow官网安装你需要的具体版本了吗?
  • 我写了一个命令作为解决方案,如果它仍然不起作用,只需重新安装你的 python 然后尝试安装 Tensorflow

标签: python tensorflow machine-learning anaconda


【解决方案1】:

如果您使用的是 Windows,请在 2018 年 8 月 13 日之前安装 Python 3.6.x,然后安装 Tensorflow;如果您使用的是 Linux,请按照此链接的说明进行操作 https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/install.html

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-04-28
    • 2020-10-28
    • 1970-01-01
    • 2018-10-03
    • 2020-03-20
    • 1970-01-01
    相关资源
    最近更新 更多