On 04/25/2014 04:43 PM, sandrine ollinger wrote:
Dear graph_tool users,
I try to use graph_tool on my Mac OS X 10.6.8. I used Macport to install py-27-graph-tool and it seems to work perfectly. But now, when I try to import graph_tool, I have successively 2 errors:
Python 2.7.6 (default, Nov 12 2013, 13:10:34) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
1)
*>>> import graph_tool as gt* 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/graph_tool/__init__.py", line 96, in <module> import scipy.stats 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*
2)
*import graph_tool.all as gt* 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/graph_tool/__init__.py", line 96, in <module> import scipy.stats 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 533, in <module> from .basic import * File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/special/basic.py", line 12, in <module> from ._ufuncs import ellipkm1, mathieu_a, mathieu_b, iv, jv, gamma, psi, zeta, \ *ImportError: cannot import name ellipkm1*
// Could you help me solve this problem?
Do you observe the sample problems simply by importing scipy, without graph-tool? For instance: >>> import scipy >>> import scipy.stats If you observe the same problem, then clearly the problem would be with scipy. You should try simply re-installing it. If you still have the same problems afterwards, I suggest you contact the macports maintainers, and report a bug: https://trac.macports.org/auth/login/?next=/newticket Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>