神秘厉害人

导航

如何为shell安装有道及更新pip.

今天尝试安装shell下的有道翻译,提示需要安装pip.

[root@mestery ~]# yum install python-pip
[root@mestery ~]# sudo pip install youdao 

 然而系统提示pip版本过期.

[root@mestery ~]# sudo pip install youdao
---------------------------------------- Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-BZChCY/youdao/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-0GPHNf-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-BZChCY/youdao/ You are using pip version 8.1.2, however version 19.0.3 is available. You should consider upgrading via the 'pip install --upgrade pip' command.

使用提示需要更新:
[root@mestery ~]# yum upgrade pip
You are using pip version 8.1.2, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
[root@oldboy ~]# pip install
You must give at least one requirement to install (see "pip help install")
You are using pip version 8.1.2, however version 19.0.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

更新命令:
[root@mestery ~] python -m pip install --upgrade pip 

检查后已经成功:
[root@mestery ~]# pip -V
pip 19.0.3 from /usr/lib/python2.7/site-packages/pip (python 2.7)
...待更

安装提示TLS/SSL错误:
_

 

 

root@mestery ~]# sudo pip install youdao
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting youdao
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/youdao/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/youdao/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/youdao/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/youdao/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/youdao/
  Could not fetch URL https://pypi.org/simple/youdao/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/youdao/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping
  Could not find a version that satisfies the requirement youdao (from versions: )
No matching distribution found for youdao

posted on 2019-02-28 13:21  神秘厉害人  阅读(472)  评论(0编辑  收藏  举报