我正在尝试使用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没有任何问题。
当前回答
我发现了问题所在。
我使用的是一台Windows电脑,之前已经安装了Python 2。 安装Python 3后(没有设置路径,我成功检查了pip3的版本-但Python可执行文件仍然指向Python2)
然后我将路径设置为python3可执行文件(删除所有python2路径),然后启动一个新的命令提示符,尝试重新安装Tensorflow。它的工作原理!
我认为这个问题也可能发生在MAC OS上,因为MAC系统上有一个默认的python。
其他回答
正确的安装方法如下所述
$ pip install --upgrade TF_BINARY_URL # Python 2.7
$ pip3 install --upgrade TF_BINARY_URL # Python 3.N
从张量流官方主页找到正确的TF_BINARY_URL
我也面临着同样的问题。我尝试了下面的方法,它奏效了。 安装Mac OS X, anaconda python 2.7
PIP卸载tensorflow export TF_BINARY_URL=<从http://tflearn.org/installation/>得到正确的url pip install——upgrade $TF_BINARY_URL
安装tensorflow-1.0.0
我知道这个问题很老了,但最近我在MacBook Air M1上遇到了这个问题。解决方案是使用pip install tensorflow-macos命令。
对于窗口,您可以使用以下命令
python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-2.3.0-cp38-cp38-win_amd64.whl
使用Git更容易,他们提供了网站上的方法,但链接访问可能不是很重要,你可以从中读取
引用https://www.tensorflow.org/install/source_windows
git clone https://github.com/tensorflow/tensorflow.git
我的Python版本是3.9.7。我也使用Windows 10,要求如下:
1. Microsoft C++ Retribution installed from Microsoft Visual Studio that matches with x64bits as required in the list.
1.1 Microsoft Visual C++ 2012 Redistribution ( x64 ) and updates
1.2 Microsoft Visual C++ 2013 Redistributable (x64) - 12.0.40664
1.3 Microsoft Visual C++ 2015-2019 Redistributable (x64) - 14.29.30133
1.4 vs_community__1795732196.1624941787.exe updates
2. Python and AI learning
tensorboard 2.6.0
tensorboard-data-server 0.6.1
tensorboard-plugin-profile 2.5.0
tensorboard-plugin-wit 1.8.0
***tensorflow 2.6.0
tensorflow-datasets 4.4.0
tensorflow-estimator 2.6.0
***tensorflow-gpu 2.6.0
tensorflow-hub 0.12.0
tensorflow-metadata 1.2.0
tensorflow-text 2.6.0
***PyOpenGL 3.1.5
pyparsing 2.4.7
python-dateutil 2.8.2
python-slugify 5.0.2
python-speech-features 0.6
PyWavelets 1.1.1
PyYAML 5.4.1
scikit-image 0.18.3
scikit-learn 1.0.1
***gym 0.21.0