Opened 11 years ago

Closed 11 years ago

#40049 closed defect (fixed)

py27-scipy: problem importing scipy.interpolate.intrep1d, "numpy.dtype has the wrong size"

Reported by: csiebern@… Owned by: seanfarley (Sean Farley)
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: Cc: petrrr
Port: py27-scipy

Description (last modified by larryv (Lawrence Velázquez))

I am running macports on a MBP with Lion 10.8.4

I have installed python 27 and the scientific packages (Numpy, SciPy etc.) When trying to import the intrep1d function from scipy.interpolate python returns the following error:

Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/core/interactiveshell.py", line 2731, in run_code
    exec code_obj in self.user_global_ns, self.user_ns
  File "<ipython-input-1-5977d52fd447>", line 1, in <module>
    from scipy.interpolate import interp1d
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/interpolate/__init__.py", line 150, in <module>
    from .interpolate import *
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/interpolate/interpolate.py", line 12, in <module>
    import scipy.special as spec
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/special/__init__.py", line 529, in <module>
    from ._ufuncs import *
  File "numpy.pxd", line 155, in init scipy.special._ufuncs (scipy/special/_ufuncs.c:9950)
ValueError: numpy.dtype has the wrong size, try recompiling

I have tested and can use Numpy and dtype alone and agree with the error recommendation that the scipy packge should be recompiled.

Can I do this using the macport installer, or will I need to build scipy from source with Xcode and install independent of macports?

Change History (4)

comment:7 Changed 11 years ago by larryv (Lawrence Velázquez)

Description: modified (diff)
Keywords: python scipy removed
Owner: changed from macports-tickets@… to sean@…
Summary: py27-scipy port package issuepy27-scipy: problem importing scipy.interpolate.intrep1d, "numpy.dtype has the wrong size"

Thanks for the ticket. In the future, please Cc relevant port maintainers (port info --maintainers) and use WikiFormatting in your ticket descriptions.

comment:9 Changed 11 years ago by petrrr

Cc: Peter.Danecek@… added

Cc Me!

comment:10 Changed 11 years ago by petrrr

Works for me! OS X 10.8.5, Xcode 4.6.2, Build version 4H1003, py27-scipy @0.13.0_1

petr% python
Python 2.7.5 (default, Aug 14 2013, 18:13:34) 
[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from scipy.interpolate import interp1d
>>> 

comment:11 Changed 11 years ago by seanfarley (Sean Farley)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.