Python installation Setuptools steps detailed

Source: Internet
Author: User
Tags http request zip in python

The Easy_install command may be used in Python when you need to install a Third-party python package. Easy_install is a command from the Setuptools package developed by Peak (Python Enterprise application kit), so use Easy_ Install is actually calling Setuptools to complete the installation module.

To facilitate the subsequent installation of a variety of Third-party python packages, you need to install Setuptools first.

Install Setuptools, the following a simple command can be done, the script will automatically install for you the corresponding version of your system.

The code is as follows Copy Code
# wget Https://bootstrap.pypa.io/ez_setup.py-O-| Python

Most of the time, the above command can complete the installation of Setuptools, but I installed in the CentOS system Setuptools, seemingly not so smooth, so my solution is as follows:

The code is as follows Copy Code

# wget--no-check-certificate Https://bootstrap.pypa.io/ez_setup.py-O-| Python
--2014-09-18 09:27:42--https://bootstrap.pypa.io/ez_setup.py
Resolving Bootstrap.pypa.io ... 103.245.222.175
Connecting to bootstrap.pypa.io|103.245.222.175|:443 ... Connected.
Warning:certificate common name ' *.c.ssl.fastly.net ' doesn ' t match requested host name ' Bootstrap.pypa.io '.
HTTP request sent, awaiting response ... OK
length:10476 (10K) [Text/x-python]
Saving to: ' STDOUT '

100%[======================================================================>] 10,476--.-K/s in 0.1s

2014-09-18 09:27:43 (98.6 kb/s)-'-' saved [10476/10476]

Downloading Https://pypi.python.org/packages/source/s/setuptools/setuptools-5.7.zip
Traceback (most recent call last):
File "", line 332, in
File "", line 327, in main
File "", line 287, in Download_setuptools
File "", line 224, in Download_file_wget
File "", line 169, in _clean_check
File "/usr/local/lib/python2.7/subprocess.py", line 511, in Check_call
? Raise Calledprocesserror (Retcode, cmd)
Subprocess. Calledprocesserror:command ' [' wget ', ' https://pypi.python.org/packages/source/s/setuptools/setuptools-5.7.zip ', ' --quiet ', '--output-document ',

'/alidata/data/python/setuptools-5.7.zip '] ' returned Non-zero exit status 1

The automatic installation script needs to download a file, but the download does not come down, card in downloading here, had to change to manual way to download the

The code is as follows Copy Code

# wget Https://pypi.python.org/packages/source/s/setuptools/setuptools-5.7.zip--no-check-certificate
--2014-09-18 09:29:15--Https://pypi.python.org/packages/source/s/setuptools/setuptools-5.7.zip
Resolving pypi.python.org ... 103.245.222.223
Connecting to pypi.python.org|103.245.222.223|:443 ... Connected.
Warning:certificate common name ' www.python.org ' doesn ' t match requested host name ' pypi.python.org '.
HTTP request sent, awaiting response ... OK
length:1114918 (1.1M) [Application/zip]
Saving to: ' Setuptools-5.7.zip '

100%[=========================================================================>] 1,114,918 41.3K/s in 34s

2014-09-18 09:29:49 (32.3 kb/s)-' Setuptools-5.7.zip ' saved [1114918/1114918]

Download the automatic installation script below and let the script install it for us.

  code is as follows copy code

[root@ay1308142020485982a0z python]# wget--no-check-certificate https://bootstrap.pypa.io/ez_setup.py
--2014-09-18 09:29:57--https://bootstrap.pypa.io/ez_setup.py
Resolving Bootstrap.pypa.io ... 103.245.222.175
Connecting to bootstrap.pypa.io|103.245.222.175|:443 ... Connected.
Warning:certificate common name ' *.c.ssl.fastly.net ' doesn ' t match requested host name ' Bootstrap.pypa.io '.
HTTP request sent, awaiting response ... OK
length:10476 (10K) [Text/x-python]
Saving to: ' ez_setup.py '

100%[==============================>] 10,476

--.-k/s in 0s

2014-09-18 09:29:58 (55.8 MB/s)-' ez_setup.py ' saved [10476/10476]

Finally complete the installation

  code is as follows copy code

# python Ez_ setup.py

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.