pip安装环境报错 File "/usr/lib/python2.7/site-packages/pip/_internal/cli/main.py", line 60

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow-gpu==1.7

pip安装环境报错 File "/usr/lib/python2.7/site-packages/pip/_internal/cli/main.py", line 60

root@3b3f120a2d07:~# pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tensorflow-gpu==1.7

Traceback (most recent call last):

  File "/root/anaconda3/bin/pip", line 7, in

    from pip._internal.cli.main import main

  File "/root/anaconda3/lib/python3.5/site-packages/pip/_internal/cli/main.py", line 60

  sys.stderr.write(f"ERROR: {exc}")

                                  ^

SyntaxError: invalid syntax

需要改要改python环境

remove python-pip

cd /usr/local/src

wget https://bootstrap.pypa.io/2.7/get-pip.py

python get-pip.py

pip -V

你可能感兴趣的:(pip安装环境报错 File "/usr/lib/python2.7/site-packages/pip/_internal/cli/main.py", line 60)