Python Installation Module Error Resolution (PIP-related installation) __python

Source: Internet
Author: User
Tags redis install redis

Python ez_setup.py #安装 Setuptools

Then in CMD into the command Line window, into the ez_setup.py directory, I am here to download the place in the F disk, and then enter the command: The Python ez_setup.py system will automatically download the Setuptools tool installation, the final outcome is to display coding errors:

F:\>python ez_setup.py

Extracting in C:\USERS\YC_00001\APPDATA\LOCAL\TEMP\TMPUJXUQP

Now working in c:\users\yc_00001\appdata\local\temp\tmpujxuqp\setuptools-7.0

Installing Setuptools

Http://jingyan.baidu.com/article/e4d08ffdb6a5040fd2f60dfe.html (from)


Solution, found a lot of methods on the Internet, the following is available (forget the source, please the original author to forgive ....) ):

Open C:\Python27\Lib find mimetypes.py in about 256 lines find default_encoding = sys.getdefaultencoding ()

Before this line, add:

If sys.getdefaultencoding ()!= ' GBK ':

Reload (SYS)

Sys.setdefaultencoding (' GBK ')

Then save, then run Python ez_setup.py, and here's my screenshot:



the correct method of installing Pip,setuptools under Win7 python2.7 (pro-Test)

Jincon published in 2014-06-21 11:09:00 in: Python Development, technology development

Really wonderful, I win7 under the test python2.7 installation Pip,setuptools always not, as if the script is not, the version used is python2.7.6 version. There is no way to change the version of the lower point, the high version of the egg pain Ah, Win7 under the python2.7.5 installation Pip,setuptools the correct method (pro-Test)

Windows7 under

0. Install python2.7.5 First

32 digits: Https://www.python.org/ftp/python/2.7.5/python-2.7.5.msi

64 digits: Https://www.python.org/ftp/python/2.7.5/python-2.7.5.amd64.msi

1. Download https://bootstrap.pypa.io/ez_setup.py

Python ez_setup.py #安装 Setuptools

2. Download https://raw.github.com/pypa/pip/master/contrib/get-pip.py

Python get-pip.py Install # #安装 PIP

3. After installation will be in the system directory to generate scripts directory, which has:

Executable files such as Easy_install.exe and Pip.exe.

It is best to add Python and python2.7.5/scripts to the system configuration file path attribute value.

So you can execute it directly,

After you install the PIP and Easy_installer tools, it is convenient to install other Python libraries later

Cases:
Easy_install Redis
Or
Pip Install Redis (PIP is recommended)

I test, easy_install no problem, but the use of PIP error, wonderful, and then no way to use the Easy_install reinstall a bit:


1 # install PIP
2 >c:\python27\scripts\easy_install.exe pip
OK, this will do, you can try again. The test is OK.
How to install the PIP under WindowsHttp://zhidao.baidu.com/link?url=R472GT-1kaDQKbWql0AMNdtBvLvZuu5qrC3TwHlBaeMHQCLvf4_tINOW7OAvN4EJ3C6A6Q-dhiaxW0OkdpEq5q

Take WIN7 system as an example to introduce the method:

1. Before installing PIP, please confirm that Python, and easy_install tools have been installed in win system, if the system is installed successfully, Easy_install under the directory C:\Python27\Scripts, confirm screenshot below:

2. Go to the command line and then switch the directory to the script folder under the Python installation directory and run the Easy_inatall pip.

3.pip after the successful installation, under the CMD execution Pip, will have the following prompts.
















Related Article

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.