Ubuntu 14.04 .5 LTS 安装Python-pip(二)

安装pip最新版本需要先卸载原来的版本。

#pip -V
#sudo apt-get autoremove python-pip

下载官方pip

 #wget https://files.pythonhosted.org/packages/ae/e8/2340d46ecadb1692a1e455f13f75e596d4eab3d11a57446f08259dee8f02/pip-10.0.1.tar.gz

解压缩

#tar -xzvf pip-10.0.1.tar.gz

进入解压缩完成目录

 #cd pip-10.0.1
 #sudo python3.6 setup.py install

安装完毕,测试一下看看是不是新版本。

#pip -V
pip 10.0.1 from /usr/local/lib/python3.6/site-packages/pip-10.0.1-py3.6.egg/pip (python 3.6)

下面要测试pip是否安装成功,就是能否加载包也就是框架。

#pip install web.py
Could not fetch URL https://pypi.org/simple/web-py/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/web-py/ (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 web.py (from versions: )
No matching distribution found for web.py
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping

看了是没有安装成功,需要找一下原因。

你可能感兴趣的:(Ubuntu 14.04 .5 LTS 安装Python-pip(二))