Mac使用:找不到满足张量流要求的版本(来自版本:)找不到与张量流匹配的分布

时间:2018-09-03 05:35:26

标签: python macos pip

python版本:

$ python3 -V
Python 3.7.0

pip3路径:

which -a pip3
/Library/Frameworks/Python.framework/Versions/3.7/bin/pip3
/Library/Frameworks/Python.framework/Versions/3.6/bin/pip3
/Library/Frameworks/Python.framework/Versions/3.6/bin/pip3
/usr/local/bin/pip3

pip3版本:

pip3 -V
pip 18.0 from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip (python 3.7)

tensorflow可以由pip安装而没有任何问题,但不能由pip3安装

$ pip3 install tensorflow
Collecting tensorflow
  Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow

当我尝试安装其他任何软件包时,也会发生类似的问题。

1 个答案:

答案 0 :(得分:0)

我通过卸载python @ 2并重新安装python@3.8来解决此问题

$ brew doctor
# it shows a lot warnings about python@2 and python@3.8

$ brew uninstall python@2

$ brew reinstall python@3.8

$ python3 --version
Python 3.8.6

$ pip3 install tensorflow