前言
python/86830.html">python下的setuptools帶有一個(gè)easy_install的工具,在安裝python的每三方模塊、工具時(shí)很有用,也很方便。
安裝setuptools前先安裝pip
1. 下載:
在它的官網(wǎng)可以下載到安裝包:
https://pypi.python.org/pypi/setuptools
頁(yè)面最下面的是它的安裝鏈接,如:
$wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-12.0.3.tar.gz#md5=f07e4b0f4c1c9368fcd980d888b29a65
2. 安裝
$ tar -zxvf setuptools-12.0.3.tar.gz$ cd setuptools=12.0.3$ python setup.py install
3. 出現(xiàn)錯(cuò)誤提示:
Installed /usr/local/python2.7.3/lib/python2.7/site-packages/supervisor-4.0.0_dev-py2.7.eggProcessing dependencies for supervisor==4.0.0-devSearching for meld3>=1.0.0Reading https://pypi.python.org/simple/meld3/Download error on https://pypi.python.org/simple/meld3/: [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed -- Some packages may not be found!Couldn't find index page for 'meld3' (maybe misspelled?)Scanning index of all packages (this may take a while)Reading https://pypi.python.org/simple/Download error on https://pypi.python.org/simple/: [Errno 1] _ssl.c:504: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed -- Some packages may not be found!No local packages or download links found for meld3>=1.0.0error: Could not find suitable distribution for Requirement.parse('meld3>=1.0.0')解決辦法:
上網(wǎng)查詢了問題原因: 是curl的證書太老了需要下載最新的證書:
下載最新的證書文件
$ wget http://curl.haxx.se/ca/cacert.pem
更名為ca-bundle.crt放置到默認(rèn)目錄
$ mv cacert.pem ca-bundle.crt $ mv ca-bundle.crt /etc/pki/tls/certs
總結(jié)
以上就是這篇文章的全部?jī)?nèi)容了,希望本文的內(nèi)容對(duì)大家的學(xué)習(xí)或者工作能帶來一定的幫助,如果有疑問大家可以留言交流,謝謝大家對(duì)VEVB武林網(wǎng)的支持。
新聞熱點(diǎn)
疑難解答
圖片精選