Numeric import_array() problem - OS X 10.4

P

Paul Miller

I had some code that used to work that now doesn't. It's an embedded
Python interpreter that uses numpy internally. The code calls
"import_array()", which now fails (and generates a "ImportError: No
module named _numpy" error).

This is on the latest OS X 10.4 release. I have Numeric installed in the
Python site-packages directory, and it loads and works properly from a
normal Python command prompt.

I also just noticed that other modules from the standard Python library
can't be loaded from within my embedded interpreter. It does find
scripts I have in my application sub-directory, which I reference by
adding a path to sys.path.

I modified my startup script to print out sys.path, and a bunch of paths
(including the site-packages location) are there.

Has something changed with Apple's Python implementation that changes
the way standard library modules are imported from embedded interpreters?
 
P

Paul Miller

Paul said:
I had some code that used to work that now doesn't. It's an embedded
Python interpreter that uses numpy internally. The code calls
"import_array()", which now fails (and generates a "ImportError: No
module named _numpy" error).

Nevermind - "user error". A recent OS X update changed the paths Python
looks in for site libraries.

I love it when Apple silently decides to break stuff. I can spend hours
trying to track it all down instead of getting work done - but it's fun
because I'm using a shiny Mac!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top