我正在尝试使用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没有任何问题。
当前回答
对于窗口,您可以使用以下命令
python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-2.3.0-cp38-cp38-win_amd64.whl
其他回答
以上答案帮助我解决了我的问题,特别是第一个答案。但在检查python版本之后,我们需要它是64位版本。
根据您拥有的操作系统,我们可以使用以下命令使用pip命令安装tensorflow。
下面的链接有谷歌api链接,可以添加在下面命令的末尾,在您各自的机器上安装tensorflow。
Root命令:python -m pip install——upgrade (link) link:该链接中各自的操作系统链接
我发现TensorFlow 1.12.0只适用于Python 3.5.2版本。我用的是Python 3.7,但它不起作用。所以,我不得不降级Python,然后我可以安装TensorFlow让它工作。
将python版本从3.7降级到3.6
conda install python=3.6.8
如果你正在使用Anaconda Python安装,pip install tensorflow将给出上面所述的错误,如下所示:
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
根据TensorFlow安装页面,当运行pip install时,你需要使用——ignore-installed标志。
然而,在此之前,请参阅此链接 确保TF_BINARY_URL变量与你想要安装的TensorFlow版本相关的设置正确。
告诉你具体是什么问题的方法是:
PIP install -vvv tensorflow
这将向您显示可用的轮子文件以及它们不匹配的原因。
如果你执行pip debug -verbose,它会显示所有兼容的标签。
在我的例子中,我试图在一个多通道ubuntu实例的m1 mac上安装tensorflow,而需要https://pypi.org/project/tensorflow-aarch64/
在Windows中安装TensorFlow的URL,下面是URL。这对我来说很有效。
python -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl