3

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!

Thiem Nguyen
  • 6,345
  • 7
  • 30
  • 50
Dirk
  • 3,073
  • 4
  • 31
  • 36
  • Which version of Python are you using? Python 2.6 comes with sqlite3 module included by default and you don't need to install any other modules to use sqlite3 – Praveen Gollakota Mar 31 '11 at 18:20
  • Hah! thanks. This actually helped - I was trying to execute: import sqlite2. but import sqlite3 works. Now if only I can get serial comms to work on x64! – Dirk Mar 31 '11 at 18:24
  • Did you install a 64-bit version of Python 2.7 or a 32 bit version? There are a lot of issues with installing addon packages with the 64 bit version. I've had too many problems with that. If you installed the 64 bit version I recommend switching to 32 bit version. – Praveen Gollakota Mar 31 '11 at 18:26
  • I am using the 64 bit one, and it has been a major headache. I'll try the 32 bit one. – Dirk Mar 31 '11 at 18:28

3 Answers3

5

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.

Sridhar Ratnakumar
  • 81,433
  • 63
  • 146
  • 187
0

When that says "g++ compiler" they really mean the C++ compiler, which for mingw is gcc.

jhocking
  • 5,527
  • 1
  • 24
  • 38
  • Understood. But how to I get it to find that? – Dirk Mar 31 '11 at 18:21
  • You probably have to put it in your computer's Path environment variable. Go to Control Panel>System>Advanced System Settings. You should have C:\MinGW\bin in the Path environment variable. – jhocking Mar 31 '11 at 18:25
0

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.

Jakob Bowyer
  • 33,878
  • 8
  • 76
  • 91