Python3.52安装扩展错误
ImportError: No module named 'setuptools'
这句错误提示的表面意思是:没有setuptools的模块,说明python缺少这个模块,那我们只要安装这个模块即可解决此问题,下面我们来安装一下
[zzq@weekend110 software]$ wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
--2017-01-07 06:05:10-- 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... 301 Moved Permanently
Location: https://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz [following]
--2017-01-07 06:05:11-- https://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
Connecting to pypi.python.org|151.101.72.223|:443... connected.
ERROR: certificate common name “www.python.org” doesn’t match requested host name “pypi.python.org”.
To connect to pypi.python.org insecurely, use ‘--no-check-certificate’.
[zzq@weekend110 software]$ wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz --no-check-certificate
--2017-01-07 06:05:33-- 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... 301 Moved Permanently
Location: https://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz [following]
--2017-01-07 06:05:34-- https://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
Connecting to pypi.python.org|151.101.72.223|:443... connected.
WARNING: certificate common name “www.python.org” doesn’t match requested host name “pypi.python.org”.
HTTP request sent, awaiting response... 200 OK
如果需要就加上--no-check-certificate参数
Python3及以上地址:
wget –no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-19.6.tar.gz#md5=c607dd118eae682c44ed146367a17e26
python setup.py build
python setup.py install