February 16, 2008

Cygwin SQLAlchemy Install Puzzler

Hmm. This Cygwin session gave me a few moments' pause. What could be the problem here?

sholden@bigboy ~
$ easy_install-2.5 SQLAlchemy
Searching for SQLAlchemy
Best match: sqlalchemy 0.4.2dev-r3811
Processing sqlalchemy-0.4.2dev_r3811-py2.5.egg
sqlalchemy 0.4.2dev-r3811 is already the active version in easy-install.pth

Using c:\python25\lib\site-packages\sqlalchemy-0.4.2dev_r3811-py2.5.egg
Processing dependencies for SQLAlchemy
Finished processing dependencies for SQLAlchemy

sholden@bigboy ~
$ python
Python 2.5.1 (r251:54863, May 18 2007, 16:56:43)
[GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlalchemy
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named sqlalchemy

Easy to spot once I focus on the filename and the Windows path it contains: even under Cygwin I am running the Windows easy_install, and so it reports that SQLAlchemy is already installed in Windows!

I chickened out of running ez_setup under Cygwin, and just used the "download tar, unpack, run setup.py install" dance. Happily this installed everything perfectly (so far as can currently be discerned). So life goes on.


Paddy3118 said...

"What could be the problem here?"
Its glaringly obvious:



Bill Mill said...

I do a lot of work with Python and Cygwin on windows, and I find it best to only install windows python, and use a bash script wrapper to call it.

Steve said...

Well, I like to use the Cygwin paths and filename completion in the Cygwin command windows (for which I use rxvt to make the enviroment more Unix-like).

I realize it's a slower implementation, but convenience figures higher on the list than efficiency for development work.

A more powerful computer is relatively easy. A more powerful me is difficult :-)