Numpy/Scipy auf Mac OS 10.6 installieren

Probleme bei der Installation?
Antworten
mzh
User
Beiträge: 295
Registriert: Dienstag 3. März 2009, 15:27
Wohnort: ZH

Liebes Forum
Ich glaube die Installation von Numpy/Scipy klappt (während der Installation erscheint keine Fehlermeldung und es heisst am ende auch "Installation successfull"). Allerdings erscheint beim Test folgendes:

Code: Alles auswählen


Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/__init__.py", line 137, in <module>
    import add_newdocs
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/add_newdocs.py", line 9, in <module>
    from numpy.lib import add_newdoc
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/__init__.py", line 4, in <module>
    from type_check import *
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/lib/type_check.py", line 8, in <module>
    import numpy.core.numeric as _nx
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/__init__.py", line 5, in <module>
    import multiarray
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so, 2): no suitable image found.  Did find:
	/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/multiarray.so: no matching architecture in universal wrapper
>>> 
Ich habe mir vorher noch Python2.7 von python.org installiert. Also ich benutze nicht das native Apple-Python, glaube ich. Doch weiss ich nicht was das Apple.inc im Python header zu tun hat.

Was kann ich tun? Vielen Dank für Hilfe.
[url=http://www.proandkon.com]proandkon.com[/url]
deets

Das Apple Inc kommt davon, dass unter OSX der Apple GCC verwandt wurde - hat also nix damit zu tun.

Dein Problem haengt mit der binaer-Architektur von Numpy & deinem Python zusammen. Ich vermute mal, dass das python.org Python mit allen drei, mindestens aber mit ppc und i386 gebaut ist. Und Numpy ist halt irgendwas anderes.

Hier gibt's diverse Threads dazu, wie man Numpy unter OSX installiert. Such mal danach. Unter anderem gibt es auch eine Enthought Distribution, oder so, die das beinhaltet.
mzh
User
Beiträge: 295
Registriert: Dienstag 3. März 2009, 15:27
Wohnort: ZH

@deets: Danke für den Hinweis. Achso, sehe. Hab mir die Threads angeschaut und in der Tat, das EPD scheint zu funktionieren. Runterladen, Installation starten, brauchen. Perfekt.

Code: Alles auswählen

me@machine $ python
Enthought Python Distribution (EPD) free version -- http://www.enthought.com
Version: 7.2-2 (32-bit)
(type 'upgrade' or see http://www.enthought.com/epd/upgrade to get the full EPD)

Python 2.7.2 |EPD_free 7.2-2 (32-bit)| (default, Sep  7 2011, 09:16:50) 
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "packages", "demo", "upgrade" or "enthought" for more information.
>>> import scipy
>>> import numpy
>>>
Genau, hier steht auch Apple Inc. Also EPD wird empfohlen, +1!
[url=http://www.proandkon.com]proandkon.com[/url]
Antworten