[f2py] AttributeError: 'module' object has no attribute 'pack'

Sampsa Riikonen <[email protected]>
Newsgroups gmane.comp.python.f2py.user
Message-ID <[email protected]>
Dear List,

While trying to use f2py

f2py -c ranlux.F

I get..
--------------
Traceback (most recent call last):
  File "/usr/bin/f2py", line 24, in <module>
    main()
  File "/usr/lib/python2.6/site-packages/numpy/f2py/f2py2e.py", line 557, in 
main
    run_compile()
  File "/usr/lib/python2.6/site-packages/numpy/f2py/f2py2e.py", line 474, in 
run_compile
    from numpy.distutils.command.build_src import get_f2py_modulename
  File "/usr/lib/python2.6/site-packages/numpy/distutils/__init__.py", line 6, 
in <module>
    import ccompiler
  File "/usr/lib/python2.6/site-packages/numpy/distutils/ccompiler.py", line 
11, in <module>
    from numpy.distutils import log
  File "/usr/lib/python2.6/site-packages/numpy/distutils/log.py", line 7, in 
<module>
    from misc_util import red_text, default_text, cyan_text, green_text, 
is_sequence, is_string
  File "/usr/lib/python2.6/site-packages/numpy/distutils/misc_util.py", line 
9, in <module>
    import subprocess
  File "/usr/lib/python2.6/subprocess.py", line 404, in <module>
    import pickle
  File "/usr/lib/python2.6/pickle.py", line 171, in <module>
    class Pickler:
  File "/usr/lib/python2.6/pickle.py", line 250, in Pickler
    def put(self, i, pack=struct.pack):
AttributeError: 'module' object has no attribute 'pack'
-------------

I have had sometimes similar problems with the "subprocess" module..
How can I fix this?  I am using opensuse 11.2.

Cheers,

S.

--------------
"Jos konsultti päästetään vapaasti touhuamaan ja ohjaamaan organisaatiota,
voi edessä olla uppoaminen suunnitelmien suohon, eksyminen hankehelvettiin 
ja dokumenttiviidakkoon."
               (Mielipideosasto, Helsingin Sanomat 14.5.2009)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.