My favorites | Sign in
Project Home Downloads Wiki
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 260: How to compile pyodbc with msvc10 compiler in x86 system?
1 person starred this issue and may be notified of changes. Back to list
Status:  NoFix
Owner:  ----
Closed:  Jun 2012


 
Reported by YadongWa...@gmail.com, May 9, 2012
What steps will reproduce the problem?
1.I have installed visual studio 2010.
2.I have source code of pyodbc-3.0.3.
3.In the visual studio command prompt,
  a. run > %comsepc% /k "C:\Program Files\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86
  b. python setup.py build
4.It said: "error: Unable to find vcvarsall.bat".


May 20, 2012
#1 lukedell...@gmail.com
This error occurs because distutils is looking Visual Studio 2008.

Building a Python extension on Windows requires that you have the same C compiler that was used to build Python.  The Windows binaries from python.org for Python 2.6+ are built with Visual Studio 2008.

If you want to use Visual Studio 2010 then you need to build Python yourself from source code.  There are some notes on how to do this here:
http://wiki.python.org/moin/VS2010

Note that this would mean you must also build from source every other library that you use which contains C extensions.
Jun 23, 2012
Project Member #2 mkleehammer
As mentioned, you must use the same version of Visual Studio that Python was built with.
Status: NoFix

Powered by Google Project Hosting