By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,538 Members | 1,293 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,538 IT Pros & Developers. It's quick & easy.

Numeric import_array() problem - OS X 10.4

P: n/a
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?

Jul 5 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Paul Miller wrote:
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!

Jul 5 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.