首页 > 解决方案 > 无法使用 pip 安装张量流?

问题描述

我刚刚更新了最新的 MacOS,它清除了所有内容。

我按照这个网站的步骤。

我开始用 pip3 重新安装 tensorflow,它没有安装任何东西。

我从输入中得到这个错误pip3 install --user --upgrade tensorflow

ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow

仅供参考,我的 MacBook 是 64 位的。和

~ pip3 -V
WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
pip 20.2.4 from /Users/zack/Library/Python/3.8/lib/python/site-packages/pip (python 3.8)

~ python3 -V
Python 3.8.2

不知道发生了什么有没有人有什么想法。

标签: tensorflowpip

解决方案


根据此文档https://www.tensorflow.org/install/pip#package-location 和您应该运行的 python 版本

python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.3.0-cp38-cp38-macosx_10_14_x86_64.whl

这是第 3 步,因此请检查您是否正确安装了第 1 步和第 2 步中的软件包


推荐阅读