One, Python, Pip, setuptools installation

Source: Internet
Author: User

1. installation of Python

(1) Python, all the way next, then configure the environment variables, D:\Python27\;D: \python27\scripts;

(2) Check the correct installation: cmd, enter python, you can view the version number ; Exit Interactive mode Ctrl + Z,

2. installation of PIP

(1) Unzip the download file to the D Drive

(2) cmd into the setuptools-0.6c11 directory after decompression

(3) Execute python setup.py build

(4) After step three execute, execute python setup.py install

(5) in the extract directory of Pip, execute python setup.py install is successful

(6) Verify cmd input pip

Suggestion: Pip and python27 are in D - Drive

(7) Problems encountered:

① in the Python Environment, when using the PiP command to install the error message:

Unicodeencodeerror: 'ascii' codec can't encode characters in Position 1-5: Ordinal not in range

A Find the path \lib\site-packages

b New file sitecustomize.py under Path , file content is:

Import Sys

Reload (SYS)

Sys.setdefaultencoding (' Utf-8 ')

C Then when you use pip to install it, it solves the problem.

3. Setuptools Installation

(1) Unzip the download file to the D Drive

(2) cmd into the setuptools-0.6c11 directory after decompression

(3) Execute python setup.py build

(4) After step three execute, execute python setup.py install

(5) in the extract directory of Pip, execute python setup.py install is successful

Suggestion: Setuptools,pip and python27 are all in D - Drive

(6) Questions:

① Execute python setup.py install with error:

A Confirm Pip is installed correctly

b In the pip directory, execute pip install nose or pip install selenium

② Error Display:unicodedecodeerror: ' UTF8 ' codec can ' t decode byte 0xc3 in position 7:invalid

Ontinuation byte

A Find the path \lib\site-packages

b New file sitecustomize.py under Path , file content is:

Import Sys

Sys.setdefaultencoding (' GBK ')

One, Python, Pip, setuptools installation

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.