我正在尝试使用pip安装TensorFlow:
$ pip install tensorflow --user
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
我做错了什么?到目前为止,我使用Python和pip没有任何问题。
我正在尝试使用pip安装TensorFlow:
$ pip install tensorflow --user
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
我做错了什么?到目前为止,我使用Python和pip没有任何问题。
当前回答
更新时间:2016年11月28日:TensorFlow现在可以在PyPI中使用,从0.12版本开始。你可以打字
pip install tensorflow
…或…
pip install tensorflow-gpu
...分别安装TensorFlow的cpu加速版或gpu加速版。
之前的回答:TensorFlow还没有在PyPI存储库中,所以你必须为你的操作系统和Python版本指定适当的“轮子文件”的URL。
TensorFlow网站上列出了支持的配置的完整列表,但例如,要在Linux上仅使用CPU安装Python 2.7的0.10版本,您将键入以下命令:
$ pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.10.0rc0-cp27-none-linux_x86_64.whl
其他回答
你需要一个64位版本的Python,在你的情况下,你使用的是32位版本。到目前为止,Tensorflow只支持64位版本的Python 3.5。X和3.8。Windows操作系统。请参阅安装文档以了解当前支持的内容
要检查您正在运行的Python版本,输入Python或python3启动解释器,然后输入import struct;print(struct.calcsize("P") * 8),这将打印32或64来告诉您正在运行的Python的比特版本。
评论:
要下载不同版本的Windows Python,请访问python.org/downloads/windows并向下滚动,直到看到以“64”结尾的版本。这将是64位版本,应该与张量流一起工作
如果你试图在windows机器上安装它,你需要有64位版本的python 3.5。这是真正安装它的唯一方法。来自网站:
TensorFlow仅支持Windows上的64位Python 3.5。我们已经用以下Python发行版测试了pip包: Anaconda的Python 3.5 Python 3.5来自python.org。
你可以从这里下载合适的python版本(确保你选择了一个写着“Windows x86-64”的版本)
现在,您应该能够使用pip install tensorflow或python -m pip install tensorflow进行安装(如果同时安装了python2和python3,请确保您使用的是从python3安装的正确pip)
请记住安装Anaconda 3-5.2.0作为最新版本,即3-5.3.0,包含Tensorflow不支持的python 3.7版本。
唯一对我有用的是使用Ananconda并使用conda create -n tensorflow python=3.5创建一个新的conda env,然后使用activate tensorflow激活,最后使用conda install -c conda-forge tensorflow。
这可以解决我遇到的每个问题,包括ssl certs,代理设置,并且不需要管理员访问。需要注意的是,这并不是由tensorflow团队直接支持的。
源
我的环境:Win 10, python 3.6
pip3 install --upgrade tensorflow
pip install --upgrade tensorflow
错误:
> Collecting tensorflow Could not find a version that satisfies the
> requirement tensorflow (from versions: ) No matching distribution
> found for tensorflow
我还尝试了pip install tensorflow和pip install tensorflow-gpu。 但错误:
> Could not find a version that satisfies the requirement tensorflow (from versions: ) No matching distribution found for tensorflow
> Could not find a version that satisfies the requirement tensorflow-gpu (from versions: ) No matching distribution found for tensorflow-gpu
使用Step (https://www.tensorflow.org/install/install_windows)尝试安装OK
Follow the instructions on the Anaconda download site to download and install Anaconda. https://www.continuum.io/downloads Create a conda environment named tensorflow by invoking the following command: C:> conda create -n tensorflow pip python=3.5 Activate the conda environment by issuing the following command: C:> activate tensorflow (tensorflow)C:> # Your prompt should change Issue the appropriate command to install TensorFlow inside your conda environment. To install the CPU-only version of TensorFlow, enter the following command: (tensorflow)C:> pip install --ignore-installed --upgrade tensorflow To install the GPU version of TensorFlow, enter the following command (on a single line): (tensorflow)C:> pip install --ignore-installed --upgrade tensorflow-gpu
按照以下步骤安装tensorflow和keras:
从https://repo.anaconda.com/archive/下载python 3.6附带的Anaconda3-5.2.0 安装Anaconda并打开Anaconda提示符并执行以下命令 Conda安装jupyter Conda安装scipy PIP安装sklearn PIP安装msgpack PIP安装熊猫 PIP安装panda -datareader PIP安装matplotlib PIP安装枕 PIP安装请求 PIP install h5py PIP安装tensorflow PIP安装keras