Tensorflow 安装失败,在 Ubuntu16.04 服务器上使用 pip 或 pip3

时间:2021-01-27 15:27:57

标签: tensorflow pip ubuntu-16.04

我已经安装了一个带有 python3 和 pip3 的全新 Ubuntu 16.04 服务器。 使用 pip install tensorflow 安装 tensorflow 时,出现以下错误。

    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-delo14za/numpy/setup.py", line 68
        f"NumPy {VERSION} may not yet support Python "
                                                     ^
    SyntaxError: invalid syntax
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-delo14za/numpy/
You are using pip version 8.1.1, however version 21.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(venv) atp@atp:~/TensorFlow$ 

在成功运行建议的 pip install --upgrade pip 然后重试相同的 pip3 install tensorflow 后,我立即收到 pip 或 pip3 的错误强>.

(venv) atp@atp:~/TensorFlow$ pip3 install tensorflow
Traceback (most recent call last):
  File "/home/atp/TensorFlow/venv/bin/pip3", line 7, in <module>
    from pip._internal.cli.main import main
  File "/home/atp/TensorFlow/venv/lib/python3.5/site-packages/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax
(venv) atp@atp:~/TensorFlow$ pip install tensorflow
Traceback (most recent call last):
  File "/home/atp/TensorFlow/venv/bin/pip", line 7, in <module>
    from pip._internal.cli.main import main
  File "/home/atp/TensorFlow/venv/lib/python3.5/site-packages/pip/_internal/cli/main.py", line 60
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax
(venv) atp@atp:~/TensorFlow$ 

这是我唯一没能通过的 pip 阶段。

0 个答案:

没有答案