简体   繁体   中英

Python: Unable to easy_install (Windows 7 x64)

I'm running python 2.7 on Windows 7 x64, and trying to easy_install pysqlite.

With command: easy_install -U pysqlite

It exits with the error:

error: Setup script exited with error: Unable to find vcvarsall.bat

This site: http://code.google.com/p/rdflib/issues/detail?id=104#c4 suggests a workaround of installing MingGW, saying to check the g++ option on install (plus some other stuff).

Unfortunately, MingGW does not give me the option to install g++, only c++, and of course on running easy_install a second time, I get ".. command 'gcc' failed: No such file or directory". So now I am el stucko.

Any advice on how to fix this problem would be great!

Even if you install a compiler (MinGW or Visual Studio), you still have to install SQLite3 development libraries. It is a pain to build things on Windows, so I suggest that you get the unofficial pre-built Windows binaries and install it.

As an aside, you should probably consider switching to ActivePython as it includes a package manager that allows you to install pre-built modules from ActiveState's repository .

As for the particular error in question, that is a distutils bug and you should raise your concerns in the Python bug tracker .

当说“g ++编译器”时,它们实际上是指C ++编译器,对于mingw来说是gcc。

You need to install the Microsoft Visual C compiler thingy (the 2010 one). And use that as your compiler for all modules. You can also mess with distuls.cfg and specify a compiler that way.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM