简体   繁体   中英

ImportError when installing NumPy for Python 2.7

EDIT: after reading this http://projects.scipy.org/numpy/ticket/1322 it seems that the NumPy version I am using doesn't work with Mac OS 10.5.x. Does anyone have access to a version of NumPy that works with Mac OS 10.5? I can't get it to compile either.

Original post ...

I am trying to use NumPy, but I'm having difficulty installing it. I'm using the installer that is available on sourceforge.

NumPy v1.5.0 (Py2.7)
Python 2.7
Mac OS 10.5.8 (PPC)

After running the installer (all I did was double-click the .pkg and follow the instructions), I try to import it ...

>>> import numpy

Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import numpy
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/nump/__init__.py", line 153, in <module>
    import random
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/random/__init__.py", line 87, in <module>
  from mtrand import *
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/random/mtrand.so, 2): Symbol not found: _fopen$UNIX2003
  Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/random/mtrand.so
  Expected in: /usr/lib/libSystem.B.dylib

Does anyone have experience with this or have advice on how to fix it?

Thanks!

You can find discussion about current problems with Mac OS on the numpy mailing list, and I would recommend to discuss installation problems there, since that's were the developers are that try to fix the problems.

for example http://groups.google.com/group/numpy/browse_thread/thread/a0ceb45b58feca2b#

and this is OS 10.5 specific

http://groups.google.com/group/numpy/browse_thread/thread/de75279785d56a25/2bfbb96e6d6c0a2e

You could join the effort, since they don't seem to have many OS 10.5 users available for testing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM