今天尝试安装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 pipYou 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 installYou 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 -Vpip 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
原文地址:https://www.cnblogs.com/shenmilihairen/p/10449767.html