安装pip时发生错误

时间:2016-12-12 09:03:03

标签: python installation pip

我不知道接下来要做什么修复?所有的东西都是红色的! 这是我在使用python get-pip.py进行最后一步时所显示的内容 我只是按照

的说明进行操作
Exception:
Traceback (most recent call last):
   .....(too long)
   conn = self.get_connection(request.url, proxies)
  File "/tmp/tmpGK7Hjj/pip.zip/pip/_vendor/requests/adapters.py", line 290, in get_connection
    proxy_manager = self.proxy_manager_for(proxy)
  File "/tmp/tmpGK7Hjj/pip.zip/pip/_vendor/requests/adapters.py", line 184, in proxy_manager_for
    **proxy_kwargs
  File "/tmp/tmpGK7Hjj/pip.zip/pip/_vendor/requests/packages/urllib3/contrib/socks.py", line 154, in __init__
    "Unable to determine SOCKS version from %s" % proxy_url
ValueError: Unable to determine SOCKS version from socks://10.77.8.70:8080/

这是输入

时显示的内容
 whereis python?
 python: /usr/bin/python2.7 /usr/bin/python3.5m /usr/bin/python /usr/bin  /python2.7-config /usr/bin/python3.5 /usr/lib/python2.7 /usr/lib/python3.5 /etc/python2.7 /etc/python /etc/python3.5 /usr/local/lib/python2.7 /usr/local/lib/python3.5 /usr/include/python2.7 /usr/share/python /usr/share/man/man1/python.1.gz


 whereis pip?
 pip: /usr/local/bin/pip3.5 /usr/local/bin/pip /usr/local/bin/pip2.7

非常感谢!

1 个答案:

答案 0 :(得分:0)

要为Python2使用intsall pip,请使用以下命令:

sudo apt-get install python-pip

对于Python3使用

sudo apt-get install python3-pip