Opened 10 years ago

Closed 9 years ago

#43520 closed defect (worksforme)

error import scipy.stats

Reported by: ollinger_s@… Owned by: seanfarley (Sean Farley)
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: Cc: michaelld (Michael Dickens)
Port: py-scipy

Description

Hi,

I've the following configuration on my Mac OS X 10.6.8 (all installed with MacPort):

python27 @2.7.6_0 (active)
py27-scipy @0.13.3_1+gcc48 (active)
py27-numpy @1.8.1_0 (active)

All seems to bee allright with this installation, but I can't import scipy.stats. The following error occur:

>>> import scipy.stats
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/stats/__init__.py", line 324, in <module>
    from .stats import *
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/stats/stats.py", line 242, in <module>
    import scipy.special as special
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/special/__init__.py", line 531, in <module>
    from ._ufuncs import *
  File "__init__.pxd", line 155, in init scipy.special._ufuncs (scipy/special/_ufuncs.c:20976)
ValueError: numpy.dtype has the wrong size, try recompiling

I've uninstall all the previous version of python27, numpy and scipy. I've uninstall and reinstall the current version of numpy and scipy. But the problem still persist.

Do you have any idea to solve this problem?

Best regards, Sandrine

Change History (5)

comment:1 Changed 10 years ago by mf2k (Frank Schima)

Cc: sean@… openmaintainer@… removed
Keywords: import error scipy.stats removed
Owner: changed from macports-tickets@… to sean@…

Please do not Cc openmaintainer@… because it is not a valid email address.

My guess is that your py-numpy port needs to also be installed with the gcc48 variant.

sudo port install py27-numpy +gcc48

comment:2 Changed 10 years ago by mf2k (Frank Schima)

FYI, this works fine for me on OS X 10.9.2.

$ port installed py27-scipy py27-numpy
The following ports are currently installed:
  py27-numpy @1.8.1_0+atlas+gcc48 (active)
  py27-scipy @0.13.3_1+atlas+gcc48 (active)
In [1]: import scipy.stats

In [2]: 

comment:3 Changed 10 years ago by ollinger_s@…

Thank you for this suggestion, but it doesn't work on my Mac OS X 10.6.8

I've no problem to import scipy.stats on python 3.3, but the same error still occur with python 2.7

comment:4 in reply to:  3 Changed 10 years ago by seanfarley (Sean Farley)

Status: newassigned

Replying to ollinger_s@…:

Thank you for this suggestion, but it doesn't work on my Mac OS X 10.6.8

I've no problem to import scipy.stats on python 3.3, but the same error still occur with python 2.7

I can't reproduce this on Mountain Lion and have no 10.6 machine to test this on.

comment:5 Changed 9 years ago by seanfarley (Sean Farley)

Resolution: worksforme
Status: assignedclosed

It's been almost a year and I can't reproduce so I'm marking this as 'worksforme'.

Note: See TracTickets for help on using tickets.