Pip 安装包 No matching distribution found for PrettyTable 解决方法
作者:
dave
使用PIP 安装python 包时报如下错误:
[dave@www.cndba.cn pip-9.0.0]# pip install PrettyTable
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
Collecting PrettyTable
/usr/lib/python2.6/site-packages/pip-9.0.0-py2.6.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/usr/lib/python2.6/site-packages/pip-9.0.0-py2.6.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Could not fetch URL https://pypi.python.org/simple/prettytable/: There was a problem confirming the ssl certificate: [Errno 1] _ssl.c:490: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version - skipping
Could not find a version that satisfies the requirement PrettyTable (from versions: )
No matching distribution found for PrettyTable
这里的包肯定是存在的,所以解决方法,更换Pip源即可。
Python 更改 PyPI 源
https://www.cndba.cn/dave/article/2261
当然这里还有 SNIMissingWarning 和 InsecurePlatformWarning的警告,这2个警告需要安装其他的依赖包。 要求Python 的版本要在2.7 以上,我这里是2.6.6. 所以警告先不管了。
版权声明:本文为博主原创文章,未经博主允许不得转载。