错误:找不到满足需求张量流的版本(从版本:无)错误:找不到与张量流匹配的分布) [英] ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none) ERROR: No matching distribution found for tensorflow)

查看:118
本文介绍了错误:找不到满足需求张量流的版本(从版本:无)错误:找不到与张量流匹配的分布)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想安装tensorflow以使用Keras LSTM 我安装了Keras,然后将此行导入到我的代码中.

I want to install tensorflow to use Keras LSTM I installed Keras, and i import this lines to my code.

from keras.callbacks import LambdaCallback
from keras.models import Sequential
from keras.layers import Dense, Activation
from keras.layers import LSTM
from keras.optimizers import RMSprop

运行代码时出错:

No module named 'tensorflow'

我写"pip install tensorflow"时出现Cmd错误:

Cmd error when i write "pip install tensorflow" :

ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow

Pip版本是19.3,python版本是3.7

Pip version is 19.3 , python version 3.7

推荐答案

Windows 上,您必须使用

On Windows, you must use Python 3.7.6 (64 bits) to install tensorflow:

C:\Program Files\Python-3.7.6-x64> python.exe -m pip install --user tensorflow

不幸的是,tensorflow不支持32位版本,并且会给您带来讨厌的错误:

Unfortunately, the 32-bit version is not supported by tensorflow and will give you that nasty error:

找不到满足张量流需求的版本(来自版本:无) 错误:找不到与张量流匹配的分布

Could not find a version that satisfies the requirement tensorflow (from versions: none) ERROR: No matching distribution found for tensorflow

一些重要说明:

  • 安装 x64的Microsoft Visual C ++可再发行组件包(2015年,2017年,2019).
  • 如果您先前已安装了适用于x86的Python 3.7,请从系统中将其卸载,并删除存储x86软件包的目录,以避免与将放置在其中的新x64软件包冲突.在我的机器中,它们存储在C:\\Users\\karlphillip\\AppData\\Roaming\\Python\\Python37\\site-packages.
  • 最后,安装Python 3.7.6(x64)并使用python -m pip install --user --upgrade pip升级pip.
  • 现在,只需安装tensorflow:python -m pip install --user tensorflow
  • Install Microsoft Visual C++ Redistributable packages for x64 (2015, 2017, 2019).
  • If you have previously installed Python 3.7 for x86, uninstall it from your system and also delete the directory where the x86 packages were stored to avoid a conflict with the new x64 packages that will be placed there. In my machine they were stored at C:\\Users\\karlphillip\\AppData\\Roaming\\Python\\Python37\\site-packages.
  • Finally, install Python 3.7.6 (x64) and upgrade pip with python -m pip install --user --upgrade pip.
  • Now, simply install tensorflow: python -m pip install --user tensorflow

这篇关于错误:找不到满足需求张量流的版本(从版本:无)错误:找不到与张量流匹配的分布)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆