問題描述
tensorflow安裝報錯(ERROR:找不到滿足tensorflow要求的版本) (Tensorflow installation error (ERROR: Could not find a version that satisfies the requirement tensorflow))
pip3 install ‑‑upgrade tensorflow
我嘗試在我的虛擬環境中安裝 tensorflow,但一直遇到此錯誤。我有 pip3(pip 21.0.1) 和 python3(Python 3.7.9) 版本的必要先決條件,無法理解為什麼會發生此錯誤。非常感謝任何解決此錯誤的輸入。
pip3 install ‑‑upgrade tensorflow
ERROR: Could not find a version that satisfies the requirement tensorflow
ERROR: No matching distribution found for tensorflow
參考解法
方法 1:
pip3 install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow‑1.8.0‑py3‑none‑any.whl
This line worked for me but then this error popped up while checking for the tensorflow version
python ‑c "import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/nvidia/projects/hand_gesture/venv/lib/python3.7/site‑packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused‑import
File "/home/nvidia/projects/hand_gesture/venv/lib/python3.7/site‑packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/nvidia/projects/hand_gesture/venv/lib/python3.7/site‑packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/nvidia/projects/hand_gesture/venv/lib/python3.7/site‑packages/tensorflow/python/pywrap_tensorflow_internal.py", line 114
def TFE_ContextOptionsSetAsync(arg1, async):
^
SyntaxError: invalid syntax