Installation details of setuptools under python and solutions of No module named setuptools

  • 2020-06-07 04:48:19
  • OfStack

preface

setuptools under python comes with one easy_install tool, which is useful and convenient for installing every 3 square modules and tools of python.

Install pip before installing setuptools, please refer to: linux pip installation steps and use details

1. Download:

The installation package can be downloaded from its website:

https://pypi.python.org/pypi/setuptools

At the bottom of the page is its installation link, such as:


$wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-12.0.3.tar.gz#md5=f07e4b0f4c1c9368fcd980d888b29a65 

2. Install


$ tar -zxvf setuptools-12.0.3.tar.gz
$ cd setuptools=12.0.3
$ python setup.py install

3. Error prompt:


Installed /usr/local/python2.7.3/lib/python2.7/site-packages/supervisor-4.0.0_dev-py2.7.egg
Processing dependencies for supervisor==4.0.0-dev
Searching for meld3>=1.0.0
Reading 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.0
error: Could not find suitable distribution for Requirement.parse('meld3>=1.0.0')

Solutions:

The reason for the problem is that the curl certificate is too old to download the latest certificate:

Download the latest certificate file


$ wget http://curl.haxx.se/ca/cacert.pem 

Rename to ES49en-ES50en.crt and place in the default directory


$ mv cacert.pem ca-bundle.crt 
$ mv ca-bundle.crt /etc/pki/tls/certs 

conclusion


Related articles: