Installing RDFLIB on Windows, and Making it Work with PyDev

Posted on Saturday 12 April 2008

I had a few troubles installing RDFLIB, the Python RDF library, on my Windows Vista laptop, and getting everything to work with PyDev in Eclipse.

I have Python 2.5 installed from the MSI. When I ran python setup.py install from the RDFLIB download directory, I got the message:

error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installled,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.

I have Cygwin installed, so I installed Cygwin’s Python 2.5, then used that to run python setup.py install, which worked fine.

However, when I tried to use “Run As … Python unit-test” from within Eclipse (with PyDev installed), it didn’t work. Apparently, there are compatibility problems between PyDev and Cygwin, mostly related to windows path names.

So I went back to trying to install RDFLIB using the Windows Python. I could run python setup.py build -c mingw32 (with gcc-mingw32 installed and cygwin’s binaries directory on my path), but I still couldn’t run python setup.py install because the ‘install’ command doesn’t accept the ‘-c’ argument.

Eventually, I made it work by creating a cfg file for distutils (distutils.cfg) eg: /c/Python2x/Lib/distutils/distutils.cfg containing:

[build]
compiler=mingw32

as described here at the end of the page, under “One Last Step”.

I.e. once I had created the cfg file, and the cygwin binaries were on my path, I could run python setup.py install using the Windows Python, which also works with PyDev in Eclipse.

Alistair Miles @ 3:51 pm
Filed under: agile development and python and rdf and semantic web and semantic web
Request for Comments — SKOS Reference — W3C Working Draft 25 January 2008

Posted on Wednesday 30 January 2008

Alistair Miles @ 9:08 pm
Filed under: kos and ontologies and owl and semantic web and skos and swdwg and taxonomies and thesauri and w3c
On the OAIS Information Model as a Platform-Independent Model (PIM) in a Model-Driven Software Architecture

Posted on Wednesday 30 January 2008

Alistair Miles @ 4:27 pm
Filed under: java and model-driven architecture and modeling and oais and uml
Using PicaJet and Flickr to Manage Photos on the Desktop and Online

Posted on Thursday 3 January 2008

Alistair Miles @ 11:25 am
Filed under: flickr and images and photography and review and software
SKOS and RDFa in e-Learning

Posted on Wednesday 14 November 2007

Alistair Miles @ 6:11 pm
Filed under: e-learning and html and ontologies and owl and rdf and rdfa and semantic web and skos and swdwg and taxonomies and thesauri and w3c and web technology
Versioning and the Web

Posted on Wednesday 7 November 2007

Alistair Miles @ 2:18 pm
Filed under: change management and digital libraries and rdf and repositories and semantic web and uri and version management and web architecture and web technology
The OAIS. Information Model Revisited Part 3. Towards Models for Interpretation/Virtualisation Recipes

Posted on Tuesday 6 November 2007

Alistair Miles @ 1:19 pm
Filed under: digital preservation and hacking and modeling and oais and uml
The OAIS Information Model Revisited — Part 2.

Posted on Tuesday 30 October 2007

Alistair Miles @ 11:49 am
Filed under: digital preservation and hacking and modeling and oais and uml
Using UML 2 & Model Driven Architecture (MDA) Transforms to Generate a Persistence Layer for Java Web Applications and Web Services

Posted on Tuesday 16 October 2007

Alistair Miles @ 2:35 pm
Filed under: agile development and databases and hacking and java and model-driven architecture and modeling and software engineering and uml
The OAIS Information Model Revisited — Part 1

Posted on Tuesday 16 October 2007

Alistair Miles @ 9:19 am
Filed under: digital curation and digital preservation and hacking and modeling and software engineering and uml