Windows installation uses these partial-bottom python extensions too

Source: Internet
Author: User

Windows installation uses these low-level python extensions too uncomfortable, how to completely solve error:unable to find Vcvarsall.bat ?

1. do not press online, install MinGW, and then in the ". Python Installation path ... \lib\distutils"Create a new file distutils.cfgin this file, specify the compiler as Mingw32

Such as:

[build]compiler=mingw32

What is the reason, you can Baidu MinGW is what, after all, not GCC, but not as VC to connect windows, the building of the things, installed on the also have not good time. Even I encountered MinGW can not compile greenlet0.4.1, resulting in Greenlet unable to install the source code. MinGW often command ' gcc ' failed with exit status 1 or error:unrecognized command line option '-mno-cygwin '. Even if the compilation passed, installed, you installed the Python standard library is not compiled by MinGW, your expansion package is MinGW compiled, who also dare not guarantee the full compatibility or quality to keep up with, not to mention some inexplicable neurotic errors.

2. To download the installation VS2010 (08 version seems to be OK, but there is no need to use the old version, refers to which library can not be compiled), give an address (Baidu Cloud disk domestic should speed can)

http://pan.baidu.com/share/link?shareid=1609273194&uk=3255422755

Then note that this step is important: Execute SET vs90comntools=%vs100comntools% at the command line

If you are installing version 2012 set vs90comntools=%vs110comntools%

If you are installing version 2013 set vs90comntools=%vs120comntools%

Or more violent, directly configure the system environment variable vs90comntools point to %vs your version comntools%

You can also be more violent in the ". Python Installation path ... There's a msvc9compiler.py in the \lib\distutils directory, 243 rows found.

Toolskey = "Vs%0.f0comntools"% version changed directly to Toolskey = "VS your version Comntools" (This is why to match the "vs90comntools" reason, because they tell you the file name is the Microsoft VC 9 compiler, the code is written dead to Vc9 Comntools, will find this thing, can't find no work)

The reason for doing this is Python2. 7 expansion packs can be compiled with version 08 or higher VS, the setup.py (install script) is going to Windows system to look for version 08 vs, so set VS90 path

If the Python version is less than 2.7, it is strongly recommended to use the VS08 version, which may be partially extended with 2010 or higher. Give an example:

Http://stackoverflow.com/questions/6551724/how-do-i-point-easy-install-to-vcvarsall-bat This example illustrates VS2010 not suitable for Python2.6

3. Install vs after the restart restart, clean the previous installation of the Python extension failed residual files, and then directly download PiL Pillow Greenlet eventlet and other source code, extracted Python setup.py build discovery can be compiled. Next, replace it with a python setup.py install.

Windows installation uses these partial-bottom python extensions too

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.