by Brandon Rhodes • Home

PyEphem available for Windows!

Date: 9 November 2007
Tags:computing, pyephem, python

Over the years I have received many requests from frustrated Windows users, asking for a Windows-native version of my PyEphem astronomy library for Python. For most Windows users, an attempt to build the extension ends abruptly with the terrible and famous message:

error: Python was built with version 7.1 of Visual Studio, and extensions need to be built with the same version of the compiler, but it isn't installed.

And, as I myself do not have Visual Studio on the small Windows machine that I deign to own for the sake of my photo printer, I have never been able to offer my users much help. But earlier this year, a helpful PyEphem user named Jeff Kowalczyk emailed me a link to Philip von Weitershausen's post “Cheap binary Windows eggs”, which describes a method for building Python extensions using a freely available compiler.

Aside from the difficulty that the Python setuptools ignored the pydistutils.cfg file he recommended, making it necessary for me to name the compiler on the command line, his instructions produced a PyEphem windows egg with only a few steps:

Windows users will now find my Windows binary eggs on the Cheese Shop PyEphem entry!

Always keep in mind that behind a small triumph like this one for a Free Software developer like myself stands a great mountain-mass of work by hundreds of others in the community. In this case one helpful user lead to one informative blog post which lead to a solid and available tool — MinGW — that is a descendant of the GCC compiler Richard Stallman himself started writing over twenty years ago! All of which allowed the delivery, to a new (and closed) platform, of my Python interface to astronomy routines which Elwood Charles Downey has been maintaining for more than a quarter-century.

comments powered by Disqus

©2018