码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2018-04-06 00:14:10      阅读:453      评论:0      收藏:0      [点我收藏+]

标签:ret   usr   traceback   获取   request   ssl   url   packages   一个   

 在下载安装一个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

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

标签:ret   usr   traceback   获取   request   ssl   url   packages   一个   

原文地址:https://www.cnblogs.com/wangluochong/p/8724866.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!