我正在尝试使用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没有任何问题。
当前回答
也有类似的问题
结果是默认的GPU版本,我已经在一个没有GPU的服务器上安装了它。
pip install --upgrade tensorflow-cpu
成功了
其他回答
Python 3.7适合我,我卸载了Python 3.8.1,重新安装了3.7.6。之后,我执行:
pip3 install --user --upgrade tensorflow
这是可行的
我发现这个方法终于管用了。
python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl
编辑1:这是在Windows (8,8.1, 10), Mac和Linux上测试的。根据您的配置将python3更改为python。如果使用Python 2.x,则将url中的py3更改为py2。
编辑2:不同版本的列表,如果有人需要:https://storage.googleapis.com/tensorflow
编辑3:可用轮子包的url列表可在这里: https://www.tensorflow.org/install/pip#package-location
我可以在我的Mac上安装tensorflow-macos和tensrflow-metal
$ python -m pip install -U pip
$ pip install tensorflow-macos
$ pip install tensorflow-metal
我知道这个问题很老了,但最近我在MacBook Air M1上遇到了这个问题。解决方案是使用pip install tensorflow-macos命令。
至少在我写这篇文章的时候(2020年12月),Tensorflow不支持3.8之后的python版本。使用这个:https://www.tensorflow.org/install来检查它支持哪些python版本,我只是花了几个小时来查看这些答案,花了我很长时间才意识到这一点。