[Bug 184920] Re: import numpy fails after Py_Finalize in embedded python
Julian Taylor
jtaylor.debian at googlemail.com
Sat Apr 13 10:38:40 UTC 2013
can this issue still be reproduced in recent versions of the packaged
numpy?
** Changed in: python-numpy (Ubuntu)
Status: Triaged => Incomplete
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-numpy in Ubuntu.
https://bugs.launchpad.net/bugs/184920
Title:
import numpy fails after Py_Finalize in embedded python
Status in “python-numpy” package in Ubuntu:
Incomplete
Bug description:
Binary package hint: python-numpy
I am writing an application that embeds python and invokes scripts
that import numpy. I have found that while numpy will import correctly
the first time, if I run Py_Finalize() and then reinitialize the
python interpreter, the second time numpy is imported I get this
error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/rtxi/rtxilib.py", line 3, in <module>
from numpy import ndarray, array, empty
File "/usr/lib/python2.5/site-packages/numpy/__init__.py", line 36, in <module>
import core
File "/usr/lib/python2.5/site-packages/numpy/core/__init__.py", line 5, in <module>
import multiarray
SystemError: dynamic module not initialized properly
The workaround is to simply skip the call to Py_Finalize(). This problem was discussed on the scipy mailing list previously:
http://projects.scipy.org/pipermail/numpy-discussion/2007-April.txt.gz
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-numpy/+bug/184920/+subscriptions
More information about the foundations-bugs
mailing list