我正在尝试使用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没有任何问题。
当前回答
在Mac OS X Yosemite 10.10.5上使用Python 2.7对我来说是有效的:
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl
其他回答
登录https://pypi.python.org/pypi/tensorflow查看哪些软件包可用。
在撰写本文时,他们还没有提供源包,因此如果没有为您的平台预先构建的源包,则会出现此错误。如果向pip命令行添加-v,您将看到它遍历PyPI上可用的包,并因不兼容而丢弃它们。
你需要在其他地方找到一个预先构建的包,或者根据https://www.tensorflow.org/install/install_sources上的说明从它的源代码编译tensorflow。
他们有充分的理由不为某些平台开发:
缺少一个win32包,因为TensorFlow的依赖项Bazel只支持win64。 对于win64,只支持3.5+,因为早期版本是用不支持c++ 11的编译器编译的。
我知道这个问题很老了,但最近我在MacBook Air M1上遇到了这个问题。解决方案是使用pip install tensorflow-macos命令。
从今天开始,如果还有人想知道, Python >= 3.9也会导致同样的问题 卸载python 3.9,然后安装3.8,应该会解决这个问题
我在conda上安装了tensorflow,但似乎在windows上不起作用,但最终这个命令在cmd上可以正常工作。
python.exe -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl
对于窗口,您可以使用以下命令
python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-2.3.0-cp38-cp38-win_amd64.whl