Upgraded Ubuntu -> 11.10, Python -> 2.7.2. Now psyco doesn't work?

John Ladasky ladasky at my-deja.com
Tue Dec 20 17:43:16 EST 2011


I'm chasing down a bug that I think may be in my own code.  But a
fellow Pythoneer suspected that I might actually be looking at a bug
in Python itself.

http://groups.google.com/group/comp.lang.python/browse_thread/thread/f4b5843e2b06d1a6

Because I was using Python 2.6.6, and I was told that only bugs which
affect language security will be fixed in older revisions, I was
encouraged to try my code on Python 2.7.2.

I was running Ubuntu Linux 10.10, on which Python 2.6.6 was the
standard distribution.  I succeeded in doing an "alternate install" of
Python 2.7.2, over Ubuntu 10.10.  But I use so many packages in my
code.  Dealing with the package dependencies, and the intricacies of
invoking the right version of Python at the command prompt, were
making me dizzy.  After a few hours of struggle, I just decided to
upgrade my OS to Ubuntu 11.10, on which Python 2.7.2 is the standard
distribution.

I then installed numpy, scipy, and matplotlib, and confirmed that they
work.  I needed just one more package to try my code: psyco.
According to the Synaptic Package Manager of Ubuntu 11.10, there is a
supported version of psyco for this OS revision, python-psyco
1.6-2ubuntu1.  I downloaded it.  It installed.  But an attempt to
"import psyco" gives me an ImportError at the python prompt.

I'm not sure whether my OS upgrade is responsible for this, or whether
the accompanying Python revision bump is responsible.  I can remove
the psyco dependency for now, as it's not essential for me to test my
bug.  But I will eventually want to do some JIT compilation on a
critical inner loop in my code.  Applying psyco to that loop nearly
doubled my execution speed.

Can I fix my import problem?  Is psyco being superseded by PyPy?  From
what I've seen of PyPy, it's pretty radically different than psyco.

Thanks for any help!



More information about the Python-list mailing list