473,378 Members | 1,527 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Numeric import_array() problem - OS X 10.4

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
1 1200
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Phil | last post by:
Hi, I don't understand this strange behaviour: I compile this code : #include <Python.h> #include"Numeric/arrayobject.h" static PyObject *
1
by: Philippe Grosse | last post by:
Hi, I don't understand this strange behaviour: I compile this code : #include <Python.h> #include"Numeric/arrayobject.h" static PyObject *
0
by: Travis Oliphant | last post by:
Numarray is making great progress and is quite usable for many purposes. An idea that was championed by some is that the Numeric code base would stay static and be replaced entirely by Numarray. ...
2
by: Johannes Nix |Johannes.Nix | last post by:
Hi, I have a tricky problem with Numeric. Some time ago, I have generated a huge and complex data structure, and stored it using the cPickle module. Now I want to evaluate it quickly again on a...
4
by: Gezeala 'Eyah' Bacu\361o II | last post by:
hey guys..need your help on this.. i have a plpgsql function where in i compute numeric values for my php scripts.. my problem is my function just won't round some numbers properly.. what i...
6
by: M.A. Oude Kotte | last post by:
Hi All, I hope this is the correct mailing list for this question. But neither postgresql.org nor google could help me out on this subject. I did find one disturbing topic on the mailing list...
7
by: Sheldon | last post by:
Hi, I have the following loop that I think can be written to run faster in Numeric. I am currently using Numeric. range_va = main.xsize= 600 main.ysize= 600 #msgva is an (600x600) Numeric...
0
by: robert | last post by:
just a note - some speed comparisons : 0.60627370238398726 0.42836673376223189 0.36965815487747022 0.016557970357098384 0.15692469294117473 0.01951756438393204
13
by: nishit.gupta | last post by:
Is their any fuction available in C++ that can determine that a string contains a numeric value. The value cabn be in hex, int, float. i.e. "1256" , "123.566" , "0xffff" Thnx
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.