python安裝提示No module named setuptools,wget提示ERROR 403: SSL is required


 在下載安裝一個python工具時提示報錯No module named setuptools

 

[root@kermit supervisor-3.3.0]$ sudo python setup.py install Traceback (most recent call last): File "setup.py", line 32, in <module> from setuptools import setup, find_packages ImportError: No module named setuptools

     於是去下載setuptools工具,但遇到報錯 ERROR 403: SSL is required.

 

 

[root@kermit ~]# wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz --2017-11-03 11:20:16-- http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz Resolving pypi.python.org... 151.101.72.223, 2a04:4e42:11::223 Connecting to pypi.python.org|151.101.72.223|:80... connected. HTTP request sent, awaiting response... 403 SSL is required 2017-11-03 11:20:16 ERROR 403: SSL is required.

    這時可能你會把它認為是要進行ssl證書檢查的錯誤,可能會去嘗試下面的命令,但發現仍然會報錯。另外wget在安裝的時候也有一項配置:./configure --with-ssl=openssl,這個配置會影響wget是否支持獲取https的內容。

 

 

sudo wget --no-check-certificate http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz

    實際這個ERROR 403: SSL is required報錯只是要求請求的URL一定要是https, 請求方自己沒有做301轉向處理。所以使用以下的命令即可。然后安裝setuptools

 

 

sudo wget  https://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz tar -xvf setuptools-0.6c11.tar.gz cd setuptools-0.6c11 sudo python setup.py build sudo python setup.py install ..... #如下標志安裝成功 Installed /usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg Processing dependencies for setuptools==0.6c11 Finished processing dependencies for setuptools==0.6c11 #查看文件 [root@kermit ~]$ ll /usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg -rw-r--r-- 1 root root 333591 Nov 3 11:31 /usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM