Opened 14 years ago

Closed 14 years ago

#26861 closed defect (invalid)

py26-numpy and py26-scipy install but cannot be imported

Reported by: haroldpimentel@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.1
Keywords: Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: py26-numpy

Description

I'm running /opt/local/bin/python2.6 and I get the following output. Any ideas?

Thanks,

Harold

import numpy

Traceback (most recent call last):

File "<stdin>", line 1, in <module> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/init.py", line 154, in <module>

import ctypeslib

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/ctypeslib.py", line 60, in <module>

import ctypes

File "ctypes/init.py", line 20, in <module>

raise Exception, ("Version number mismatch", version, _ctypes_version)

Exception: ('Version number mismatch', '1.0.3', '1.1.0')

import scipy

Traceback (most recent call last):

File "<stdin>", line 1, in <module> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/scipy/init.py", line 78, in <module>

from numpy import show_config as show_numpy_config

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/init.py", line 154, in <module>

import ctypeslib

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/numpy/ctypeslib.py", line 60, in <module>

import ctypes

File "ctypes/init.py", line 20, in <module>

raise Exception, ("Version number mismatch", version, _ctypes_version)

Exception: ('Version number mismatch', '1.0.3', '1.1.0')

Change History (3)

comment:1 Changed 14 years ago by haroldpimentel@…

Cc: haroldpimentel@… added

Cc Me!

comment:2 Changed 14 years ago by haroldpimentel@…

Doh! I feel retarded... The version of ctypes was out of date. I installed py-ctypes and it works fine now.. Although, I'm curious as to why it didn't work in the first place.

comment:3 Changed 14 years ago by jmroot (Joshua Root)

Cc: mcalhoun@… added; haroldpimentel@… removed
Keywords: python numpy scipy removed
Resolution: invalid
Status: newclosed

Please remember to cc the maintainer. py-ctypes is for python24; ctypes is part of the standard library in 2.5 and later. The version that ships with python 2.6 is 1.1.0. I guess you have some kind of misconfiguration that is causing you to load the ctypes __init__.py from one place and _ctypes.so from somewhere else.

Note: See TracTickets for help on using tickets.