Tensorflow安装问题: Could not find a version that satisfies the requirement tensorflow

引言: Tensorflow大名鼎鼎,这里不再赘述其为何物。这里讲描述在安装python包的时候碰到的“No matching distribution found for tensorflow”,其原因以及如何解决。

简单的安装tensorflow

这里安装的tensorflow的cpu版本,gpu版本可以自行搜索安装指南,或者参考如下指令:

pip3 install tensorflow #cpu

这里使用的python 3.6.3版本。

pip3 install tensorflow-gpu

这里是gpu的版本。

window的环境

window 7.

问题描述:

pip3 install tensorflow

如此简单的指令,应该不会出错吧,结果得到如下错误信息:

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

为什么没有找到tensorflow呢?那我们自行找找看吧?

pip3 search tensorflow

具体的输出信息如下:

…………………..
tensorbase (0.3) - Minimalistic TensorFlow
Framework
tensorbayes (0.3.0) - Deep Variational Inference in
TensorFlow
tensorflow-tensorboard (0.4.0rc3) - TensorBoard lets you watch
Tensors Flow
tensorboard_logger (0.0.4) - Log TensorBoard events without
Tensorflow
tensorboardX (0.8) - TensorBoardX lets you watch
Tensors Flow without Tensorflow
tensorbuilder (0.3.6) - A light wrapper over TensorFlow
that enables you to easily
create complex deep neural
networks using the Builder
Pattern through a functional
fluent immutable API
tensorflow-utils (0.1.0) - Classes and methods to make
using TensorFlow easier
tensorflow-transform (0.4.0) - A library for data
preprocessing with TensorFlow
tensorflow (1.5.0rc0) - TensorFlow helps the tensors
flow
tensorflow_forward_ad (0.3.3) - TensorFlow forward-mode
automatic differentiation
tensorflow_hmm (0.4.1) - Tensorflow and numpy
implementations of the HMM
viterbi and forward/backward
algorithms
tensorflow_nlp (0.0.1) - Deep Learning NLP Tasks
implemented on Tensorflow
tensorflowonspark (1.1.0) - Deep learning with TensorFlow
on Apache Spark clusters
tensorflowservingclient (0.5.1.post2) - Prebuilt tensorflow serving
client
tensorforce (0.3.4) - Reinforcement learning for
TensorFlow
tensorfunk (0.0.0) - tensorflow model converter to
create tensorflow-independent
prediction functions.
tensorfuse (0.0.1) - Common interface for Theano,
CGT, and TensorFlow
tensorgraph (3.5.8) - A high level tensorflow library
for building deep learning
models
tensorhive (0.1.1) - Lightweight computing resource
management tool for executing
distributed TensorFlow programs
tensorlm (0.3) - TensorFlow wrapper for deep
neural text generation on
character or word level with
RNNs / LSTMs
TensorMol (0.1) - TensorFlow+Molecules =
TensorMol
tensorpack (0.8.0) - Neural Network Toolbox on
TensorFlow
tensorpy (1.1.0) - Easy Image Classification with
TensorFlow!
tensorrec (0.1) - A TensorFlow recommendation
algorithm and framework in
Python.
tensorspark (1.0.6) - Tensorflow on Spark, a scalable
system for high-performance
machine learning
tensorvision (0.1.dev1) - A library to build and train
neural networks in with
TensorFlow for Computer Vision
TFANN (1.0.1) - A neural network module
containing implementations of
MLP, and CNN networks in
TensorFlow.
TFBOYS (0.0.1) - TensorFlow BOYS
tfcf (0.0.0) - A tensorflow-based recommender
system.
tfcoreml (0.1.0) - Tensorflow to Core ML converter
tfdebugger (0.1.1) - TensorFlow Debugger
tfdeploy (0.4.2) - Deploy tensorflow graphs for
fast evaluation and export to
tensorflow-less environments
running numpy.
tfgraph (0.2) - Python's Tensorflow Graph
Library
tfgraphviz (0.0.6) - A visualization tool to show a
graph like TensorFlow and
TensorBoard
…………………………………………

悲伤的我如此难以自抑,明明可以找到的,怎么却无法安装嗯?我需要自行好好找找明明是谁? :-)

问题分析

二话不说,直接上官网上查查看,虽然官网离我朝远隔万里,需要跋山涉水之后方可达到。翻过拿到看不见的墙之后,重要可以看到官方信息了。

官方路标如下: https://www.tensorflow.org/install/install_windows

其中所提安装步骤非常简洁,如此简洁的步骤,怎么可能出错? 于是重新梳理了一下,难道是Python或者pip3本身的问题吗?

check pip3

pip –version

发现其为最新版本:

pip 9.0.1 from d:\program files (x86)\python\lib\site-packages (python 3.6)

那Python呢? 官方文档中提到如下:

If one of the following versions of Python is not installed on your machine, install it now:
* Python 3.5.x 64-bit from python.org
* Python 3.6.x 64-bit from python.org

难道我安装的python是假python不成? 估计有可能吧,难道是64bit的问题?

检查python的版本

python -v

得到了python的完整信息:

..........................................
> D:\Program Files (x86)\python\lib\__pycache__\sysconfig.cpython-36.pyc matches D:\Program Files (x86)\python\lib\sysconfig.py
>  code object from 'D:\\Program Files (x86)\\python\\lib\\__pycache__\\sysconfig.cpython-36.pyc'
import 'sysconfig' # <_frozen_importlib_external.SourceFileLoader object at 0x006A1230>
> D:\Program Files (x86)\python\lib\__pycache__\_bootlocale.cpython-36.pyc matches D:\Program Files (x86)\python\lib\_bootlocale.py
> code object from 'D:\\Program Files (x86)\\python\\lib\\__pycache__\\_bootlocale.cpython-36.pyc'
import '_locale' # <class '_frozen_importlib.BuiltinImporter'>
import '_bootlocale' # <_frozen_importlib_external.SourceFileLoader object at 0x007911D0>
> D:\Program Files (x86)\python\lib\encodings\__pycache__\gbk.cpython-36.pyc matches D:\Program Files (x86)\python\lib\encodings\gbk.py
> code object from 'D:\\Program Files (x86)\\python\\lib\\encodings\\__pycache__\\gbk.cpython-36.pyc'
import '_codecs_cn' # <class '_frozen_importlib.BuiltinImporter'>
import '_multibytecodec' # <class '_frozen_importlib.BuiltinImporter'>
import 'encodings.gbk' # <_frozen_importlib_external.SourceFileLoader object at 0x00791490>
import 'site' # <_frozen_importlib_external.SourceFileLoader object at 0x004F73D0>
Python 3.6.3 (v3.6.3:2c5fed8, Oct  3 2017, 17:26:49) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
import 'atexit' # <class '_frozen_importlib.BuiltinImporter'>

其中关于python的关键信息:

Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 17:26:49) [MSC v.1900 32 bit (Intel)] on win32

“32bit” !!! 一口老血喷出,众里寻他千百度,蓦然回首bug正在这灯火阑珊处。原来是python版本的问题导致的。

修复问题

重新下载一个64bit的python版本,之后重新操作就可以了。

python -v

查看其中的关键信息:

Python 3.6.4 (v3.6.4:d48eceb, Dec 19 2017, 06:54:40) [MSC v.1900 64 bit (AMD64)] on win32

确认是64位,没有问题。

然后直接安装tensorflow:

pip3 install tensorflow

安装过程如下:

C:\windows\system32>pip3 install tensorflow
Collecting tensorflow
  Downloading tensorflow-1.4.0-cp36-cp36m-win_amd64.whl (28.3MB)
    100% |████████████████████████████████| 28.3MB 39kB/s
Collecting enum34>=1.1.6 (from tensorflow)
  Downloading enum34-1.1.6-py3-none-any.whl
Requirement already satisfied: wheel>=0.26 in d:\program files (x86)\python\lib\site-packages (from tensorflow)
Collecting protobuf>=3.3.0 (from tensorflow)
  Downloading protobuf-3.5.1-py2.py3-none-any.whl (388kB)
    100% |████████████████████████████████| 389kB 593kB/s
Collecting tensorflow-tensorboard<0.5.0,>=0.4.0rc1 (from tensorflow)
  Downloading tensorflow_tensorboard-0.4.0rc3-py3-none-any.whl (1.7MB)
    100% |████████████████████████████████| 1.7MB 182kB/s
Requirement already satisfied: six>=1.10.0 in d:\program files (x86)\python\lib\site-packages (from tensorflow)
Collecting numpy>=1.12.1 (from tensorflow)
  Downloading numpy-1.13.3-cp36-none-win_amd64.whl (13.1MB)
    100% |████████████████████████████████| 13.1MB 81kB/s
Requirement already satisfied: setuptools in d:\program files (x86)\python\lib\site-packages (from protobuf>=3.3.0->tensorflow)
Collecting html5lib==0.9999999 (from tensorflow-tensorboard<0.5.0,>=0.4.0rc1->tensorflow)
  Downloading html5lib-0.9999999.tar.gz (889kB)
    100% |████████████████████████████████| 890kB 504kB/s
Collecting bleach==1.5.0 (from tensorflow-tensorboard<0.5.0,>=0.4.0rc1->tensorflow)
  Downloading bleach-1.5.0-py2.py3-none-any.whl
Requirement already satisfied: werkzeug>=0.11.10 in d:\program files (x86)\python\lib\site-packages (from tensorflow-tensorboard<0.5.0,>=0.4.0rc1->tensorflow)
Collecting markdown>=2.6.8 (from tensorflow-tensorboard<0.5.0,>=0.4.0rc1->tensorflow)
  Downloading Markdown-2.6.11-py2.py3-none-any.whl (78kB)
    100% |████████████████████████████████| 81kB 583kB/s
Building wheels for collected packages: html5lib
  Running setup.py bdist_wheel for html5lib ... done
  Stored in directory: C:\Users\chenjunfeng1\AppData\Local\pip\Cache\wheels\6f\85\6c\56b8e1292c6214c4eb73b9dda50f53e8e977bf65989373c962
Successfully built html5lib
Installing collected packages: enum34, protobuf, html5lib, numpy, bleach, markdown, tensorflow-tensorboard, tensorflow
Successfully installed bleach-1.5.0 enum34-1.1.6 html5lib-0.9999999 markdown-2.6.11 numpy-1.13.3 protobuf-3.5.1 tensorflow-1.4.0 tensorflow-tensorboard-0.4.0rc3

然后大家就可以愉快地写代码了.

总结

问题总在认为不可能的地方发生。如果存在问题,则一定会有原因存在。见或者不见,它都在那里。

到此这篇关于Tensorflow安装问题: Could not find a version that satisfies the requirement tensorflow的文章就介绍到这了,更多相关Tensorflow安装问题内容请搜索我们以前的文章或继续浏览下面的相关文章希望大家以后多多支持我们!

(0)

相关推荐

  • 基于docker安装tensorflow的完整步骤

    前言 google又一次成为大家膜拜的大神了.google大神在引导这机器学习的方向. 同时docker 也是一个非常好的工具,大大的方便了开发环境的构建,之前需要配置安装. 最近在自学机器学习,大热的Tensorflow自然不能错过,所以首先解决安装问题,为了不影响本地环境,所以本文基于Docker来安装Tensorflow,我的环境是Ubuntu16.04. 安装Docker Docker分为CE和EE,这里我们选择CE,也就是常规的社区版,首先移除本机上可能存在的旧版本. 移除旧版本 $

  • 详解TensorFlow在windows上安装与简单示例

    本文介绍了详解TensorFlow在windows上安装与简单示例,分享给大家,具体如下: 安装说明 平台:目前可在Ubuntu.Mac OS.Windows上安装 版本:提供gpu版本.cpu版本 安装方式:pip方式.Anaconda方式 Tips: 在Windows上目前支持python3.5.x gpu版本需要cuda8,cudnn5.1 安装进度 2017/3/4进度: Anaconda 4.3(对应python3.6)正在安装,又删除了,一无所有了 2017/3/5进度: Anaco

  • Python3.7安装keras和TensorFlow的教程图解

    win10 Python3.7安装keras深度学习集成包 TensorFlow 和Ubuntu下安装keras 在win10下安装 安装时必须检查你的python是否为64位,32位不支持!!! 32 位卸载 下载其中的64位在python官网 https://www.python.org/downloads/windows/ 然后在 pip install --upgrade tensorflow 如果出现错误可以手动选择下载然后安装对于3.7以上版本更适合 https://www.lfd.

  • Win7下Python与Tensorflow-CPU版开发环境的安装与配置过程

    以此文记录Python与Tensorflow及其开发环境的安装与配置过程,以备以后参考. 1 硬件与系统条件 Win7 64位系统,显卡为NVIDIA GeforeGT 635M 2 安装策略 a.由于以上原因,选择在win7下安装cpu版的tensorflow,使用anconda安装,总结下来,这么做是代价最小的. b. 首先,不要急于下载Python,因为最新的版本可能会与Anaconda中的Python版本发生冲突.以目前(截止2017-06-17日)的情况,Anaconda选择Anaco

  • 解决Linux Tensorflow2.0安装问题

    conda update conda pip install tf-nightly-gpu-2.0-preview conda install https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/cudnn-7.3.1-cuda10.0_0.tar.bz2 conda install https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/linux-64/cud

  • TensorFlow安装及jupyter notebook配置方法

    tensorflow利用anaconda在ubuntu下安装方法及jupyter notebook运行目录及远程访问配置 Ubuntu下安装Anaconda bash ~/file_path/file_name.sh 出现许可后可按Ctrl+C跳过,yes同意. 安装完成后询问是否加入path路径,亦可自行修改文件内容 关闭命令台重开 python -V 可查看是否安装成功 修改anaconda的python版本,以符合tf要求 conda install python=3.5 Anaconda

  • 解决安装tensorflow遇到无法卸载numpy 1.8.0rc1的问题

    最近在关注 Deep Learning,就在自己的mac上安装google的开源框架Tensorflow 用 sudo pip install -U tensorflow 安装的时候总是遇到下面的问题: sudo pip install -U tensorflow Password: The directory '/Users/jason/Library/Caches/pip/http' or its parent directory is not owned by the current us

  • 完美解决安装完tensorflow后pip无法使用的问题

    Win8,ANACONDA3(64-bit),Python3.6.2.ANACONDA Prompt中不能用pip命令安装包,并且是在安装了TensorFlow后才发生的. 报错如下: F:\360Downloads>pip install --upgrade pip Exception: Traceback (most recent call last): File "E:\tools\anaconda\py3\lib\site-packages\pip\basecommand.py&q

  • TensorFlow在MAC环境下的安装及环境搭建

    给大家分享一下TensorFlow在MAC系统中的安装步骤以及环境搭建的操作流程. TensorFlow 底层的图模型结构清晰,容易改造:支持分布式训练:可视化效果好.如果做长期项目,接触较大数据集的话,TensorFlow很适用,而且谷歌也在不断优化完备它,对于使用深度学习朋友,TensorFlow是一个很好的工具. 在学习了一段时间台大李宏毅关于deep learning的课程,以及一些其他机器学习的书之后,终于打算开始动手进行一些实践了. 感觉保完研之后散养状态下,学习效率太低了,于是便想

  • Tensorflow安装问题: Could not find a version that satisfies the requirement tensorflow

    引言: Tensorflow大名鼎鼎,这里不再赘述其为何物.这里讲描述在安装python包的时候碰到的"No matching distribution found for tensorflow",其原因以及如何解决. 简单的安装tensorflow 这里安装的tensorflow的cpu版本,gpu版本可以自行搜索安装指南,或者参考如下指令: pip3 install tensorflow #cpu 这里使用的python 3.6.3版本. pip3 install tensorfl

  • windows环境下tensorflow安装过程详解

    一.前言 本次安装tensorflow是基于Python的,安装Python的过程不做说明(既然决定按,Python肯定要先了解啊):本次教程是windows下Anaconda安装Tensorflow的过程(cpu版,显卡不支持gpu版的...) 二.安装环境 (tensorflow支持的系统是64位的,windows和linux,mac都需要64位) windows7(其实和windows版本没什么关系,我的是windows7,安装时参照的有windows10的讲解) Python3.5.2(

  • 解决Tensorflow安装成功,但在导入时报错的问题

    在Mac上按照官网教程安装成功tensor flow后,但在程序中导入时,仍然报错,包括但不限于以下两个错误.对于这种错误,原因主要在于Mac内默认的python库比较老了,即便通过pip命令安装了新的包,python也会默认导入默认位置的包.这时候需要做的就是删除,有冲突的包,对于以下两个错误,就是分别时numpy和six两个包冲突了. 可以在python命令行环境下,通过numpy.version和six.version两个命令查看当前版本,如果与预期的不一致,就可以删掉. 可以通过nump

  • go版tensorflow安装教程详解

    此文章基于ubuntu16.04 先在这里贴上官方教程 https://github.com/tensorflow/tensorflow/tree/master/tensorflow/go 注意 安装go版的tensorflow时一定要先安装C版tensorflow且要部署好go语言 c版tensorflow官方教程 (Go 版本 TensorFlow 依赖于 TensorFlow C 语言库) 按照官方的指导就可以,没什么坑,最好是官方指定位置,否则后面可能会有坑! 安好后执行这个命令 go

  • Python3.6 + TensorFlow 安装配置图文教程(Windows 64 bit)

    本文主要介绍Python3.6及TensorFlow的安装和配置流程. 一.Python官网下载自己电脑和系统对应的Python安装包. 网址:https://www.python.org/downloads/release/python-363/ 一直往下拉到Files,这里我下载的是Windows x86-64 executable installer (注意:要装TensorFlow必须安装64位的Python,TensorFlow不支持32位) 二.下载完成后得到一个python-3.6

  • tensorflow安装成功import tensorflow 出现问题

    在安装tensorflow完成后,import tensorflow as tf出现问题,问题如下: >>> import tensorflow as tf Traceback (most recent call last): File "I:\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in <module> from tensorflow.p

  • python深度学习tensorflow安装调试教程

    目录 正文 一.安装anaconda 二.安装tensorflow 三.调试 正文 用过一段时间的caffe后,对caffe有两点感受:1.速度确实快; 2. 太不灵活了. 深度学习技术一直在发展,但是caffe的更新跟不上进度,也许是维护团队的关系:CAFFE团队成员都是业余时间在维护和更新.导致的结果就是很多新的技术在caffe里用不了,比如RNN, LSTM,batch-norm等.当然这些现在也算是旧的东西了,也许caffe已经有了,我已经很久没有关注caffe的新版本了.它的不灵活之处

  • TensorFlow安装并在Pycharm搭建环境的详细图文教程

    目录 Anaconda安装: TensorFlow安装: 1.打开Anaconda Prompt 2.在Anaconda Prompt中输入 3.等待电脑配置一会,出现Proceed([y]/n)?  输入y,按下回车 4.输入以下命令,进入tensorflow1环境 5.输入以下命令,安装英伟达的SDK10.1版本 6.输入以下命令,安装英伟达深度学习软件包7.6版本 7.使用以下语句,安装tensorflow 验证TensorFlow是否安装成功: Pycharm环境配置 总结 Anacon

  • python3.6.3安装图文教程 TensorFlow安装配置方法

    本文主要介绍Python3.6及TensorFlow的安装和配置流程. 一.Python官网下载自己电脑和系统对应的Python安装包. 网址:下载地址 一直往下拉到Files,这里我下载的是Windows x86-64 executable installer (注意:要装TensorFlow必须安装64位的Python,TensorFlow不支持32位)< 二.下载python-3.6.3-amd64.exe应用程序 下载完成后得到一个python-3.6.3-amd64.exe应用程序,右

随机推荐