error: Unable to find vcvarsall.bat when installing PyMSSQL-2.0.0b1… what am i missing?

心已入冬 提交于 2019-12-06 02:44:39

When you install packages for python 2.7 it searches for Visual Studio 2008. All I had to do to fix this is set the VS90COMNTOOLS variable before calling setup.py

If you have Visual Studio 2010 installed, execute

SET VS90COMNTOOLS=%VS100COMNTOOLS%

or with Visual Studio 2012 installed

SET VS90COMNTOOLS=%VS110COMNTOOLS%

Did you install a 32bit or 64bit version of python? Please try to install a 32bit version.

Did you already try to compile with compiler shipped with Visual Studio instead of MingW32? (The file "vcvarsall.bat" initializes the environment of VS)

(Express Versions of Visual Studio are free)

Try using a MinGW version with GCC 4.5.2.

This version supports the -mno-cygwin option and should build correctly.

Using this version I successfully built PyMSSQL-2.0.0b1 on Windows 7 64-bit with Python 2.7 32-bit.

I did not modify the source tarball. I just ran the following command in the source directory: python setup.py build --compiler=mingw32. I have C:\MinGW\bin in my PATH.

Note: I was missing Cython, so I downloaded the latest version and built it using MinGW as well. I did this by running python setup.py build --compiler=mingw32. The only other dependency I was missing was the iconv library and I built it inside MinGW using these directions.

I think you have wrong version for you bit.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!