码迷,mamicode.com
首页 > 系统相关 > 详细

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

时间:2019-02-28 14:51:51      阅读:184      评论:0      收藏:0      [点我收藏+]

标签:confirm   simple   tool   sid   usr   sudo   comm   single   fail   

今天尝试安装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

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

标签:confirm   simple   tool   sid   usr   sudo   comm   single   fail   

原文地址:https://www.cnblogs.com/shenmilihairen/p/10449767.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!