[Stackless] stackless and pyPdf

Christian Tismer tismer at stackless.com
Fri Jun 29 21:45:35 CEST 2012

Hi Avi,

On 29.06.12 18:24, Avi Goldberg wrote:
> Hi There,
> I am new to stackless.  I am have a project for work that i wanted to 
> experiment with using stackless, and it requires several libraries 
> that are not part of the python core, including:
> numpy
> scipy
> pyPdf
> matplotlib
> PythonMagick
> pythonMySQL
> I am building it on a VM running Ubuntu 12.04 server. I built 
> stackless from the v2.7 source tar.bz2 found on 
> http://www.stackless.com/wiki/Download. The build was successful, and 
> i was also successful in building/installing numpy, scipy, and PIL, 
> but i have gotten stuck on pyPdf.  I am able to build and install it, 
> but when i import it in stackless python, i get:
> ImportError: no module named System
> with a stack trace that goes: from pdf import PdfFileReader, 
> PdfFileWriter --> import filters --> import System
> I dont't know if this error has anything to do with Stackless but i 
> didnt get this installing it in regular python 2.7.  Any help would be 
> greatly appreciated.  Also, are there any known issues with using any 
> of the other libraries i posted above in stackless?
I had a look at the code, filters.py and saw it:

In line 44, zlib is imported, and this seems to be not built into stackless.
After installing zlib, it should work.

I found it so quickly, because there is no "System" module in cpython.
In line 52, the bad assumption is made that if zlib is not there, it must
be IronPython, which has a System module from .net .

So, that's it. Download zlib, rooted at the same level where the stackless
source was unpacked and build stackless again.

cheers -- Chris

Christian Tismer             :^)   <mailto:tismer at stackless.com>
tismerysoft GmbH             :     Have a break! Take a ride on Python's
Karl-Liebknecht-Str. 121     :    *Starship* http://starship.python.net/
14482 Potsdam                :     PGP key -> http://pgp.uni-mainz.de
work +49 173 24 18 776  mobile +49 173 24 18 776  fax n.a.
PGP 0x57F3BF04       9064 F4E1 D754 C2FF 1619  305B C09C 5A3B 57F3 BF04
       whom do you want to sponsor today?   http://www.stackless.com/

More information about the Stackless mailing list