[Numpy-discussion] Problems distributing NumPy
Fri Aug 21 15:15:26 CDT 2009
I've been working on this problem off and on over the last couple of years,
and of course did not find the solution until I finally broke down and
posted to the list. It looks like the problem is very simple: Although I was
adding my private folder to the Python path, I was not doing so until after
NumPy was initialized. Hence, the library could not be found. It is, in
fact, as simple as I had hoped it would be to distribute NumPy in a private
[mailto:firstname.lastname@example.org] On Behalf Of Michael Cooper
Sent: August 21, 2009 12:35 PM
Subject: [Numpy-discussion] Problems distributing NumPy
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
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.409 / Virus Database: 270.13.61/2313 - Release Date: 08/21/09
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion