[Numpy-discussion] Problems distributing NumPy

Michael Cooper michael at directaid.ca
Fri Aug 21 14:34:58 EDT 2009


Hi all-

 

I am writing a C++ application with embedded Python scripting. Some of the
scripts use NumPy, so I have been working out the best way to distribute
NumPy with my software. At the moment, I've got a private folder which I add
to the Python path. In this folder, I include all the files which would
usually get installed to the "site-packages" folder. To get these files,
I've simply unzipped the distutils installer (for NumPy, I am using the "no
SSE" version at the moment), and copied the contents of the resulting
"PLATLIB" folder to my private folder.

 

For all the other libraries I am using, this method seems to work fine.
However, with NumPy, if I do things this way, when I call "import_array()",
it jumps back out of the calling function, skipping the rest of that
function, and continues from there. If I install NumPy in the usual way,
this does not happen. It seems like the NumPy initialization is failing when
I install into the private folder, but not if I use the normal installer.

 

Many of the users of my software aren't particularly Python savvy, so having
them install everything manually is not an option. I would like to avoid
having my own installer call external installers, sine that's confusing for
some users. Finally, if possible, I would like to avoid changing the user's
"Python26" folder, since I have no way of knowing what else might be relying
on its contents. Lots of searching on how to install third-party libraries
has led me to the "PLATLIB" method, so I'm at a bit of a loss as to what
else to try. Does anyone here know what might be going wrong?

 

I am using Python 2.6, Boost 1.38, and NumPy 1.3.0 on a Windows XP system.
The embedding program is written in C++, and compiled using Visual Studio
2005.

 

Thanks,

 

Michael

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20090821/b3ee0a55/attachment.html>


More information about the NumPy-Discussion mailing list