FS#42054 - [wxpython] wx-3.0-gtk2/wx/lib/plot.py fails to import numpy.oldnumeric
Attached to Project:
Arch Linux
Opened by czk (czk) - Sunday, 21 September 2014, 19:37 GMT
Last edited by Eric Belanger (Snowman) - Tuesday, 14 October 2014, 04:03 GMT
Opened by czk (czk) - Sunday, 21 September 2014, 19:37 GMT
Last edited by Eric Belanger (Snowman) - Tuesday, 14 October 2014, 04:03 GMT
|
Details
wxpython 3.0.1.1-1 provides
/usr/lib/python2.7/site-packages/wx-3.0-gtk2/wx/lib/plot.py
which tries to import numpy.oldnumeric:
--- # Needs NumPy try: import numpy.oldnumeric as _Numeric except: msg= """ This module requires the NumPy module, which could not be imported. It probably is not installed (it's not part of the standard Python distribution). See the Numeric Python site (http://numpy.scipy.org) for information on downloading source or binaries.""" raise ImportError, "NumPy not found.\n" + msg --- I was not able to find numpy.oldnumeric module in python-numpy 1.9.0-1 or any other Arch Linux Python package as of now. The error always is: Python 3.4.1 (default, May 19 2014, 17:23:49) [GCC 4.9.0 20140507 (prerelease)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import numpy.oldnumeric Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named 'numpy.oldnumeric' Python 2.7.8 (default, Jul 1 2014, 17:30:21) [GCC 4.9.0 20140604 (prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy.oldnumeric Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named oldnumeric GRASS GIS fails to launch its wxpython GUI for that. I have python-numpy, python2-numpy and python2-numarray installed. |
This task depends upon
Closed by Eric Belanger (Snowman)
Tuesday, 14 October 2014, 04:03 GMT
Reason for closing: Fixed
Additional comments about closing: wxpython-3.0.1.1-2
Tuesday, 14 October 2014, 04:03 GMT
Reason for closing: Fixed
Additional comments about closing: wxpython-3.0.1.1-2
---
# Needs Numeric or numarray or NumPy
try:
import numpy.oldnumeric as _Numeric
except:
try:
import numarray as _Numeric #if numarray is used it is renamed Numeric
except:
try:
import Numeric as _Numeric
except:
msg= """
This module requires the Numeric/numarray or NumPy module,
which could not be imported. It probably is not installed
(it's not part of the standard Python distribution). See the
Numeric Python site (http://numpy.scipy.org) for information on
downloading source or binaries."""
raise ImportError, "Numeric,numarray or NumPy not found. \n" + msg
---
Could this solution be copied to python2.7/site-packages/wx-3.0-gtk2/wx/lib/plot.py?
How about a patch as attached? It's a copy from wx-2.8-gtk2-unicode/wx/lib/plot.py.
Works for me, no side effects expected.
Or does it have to be fixed upstream?
And they already know how to address the problem the right way - [2], [3]. So we have wait for their new release?
Or could Arch ship a "transition" package with numpy.oldnumeric until then?
[1] http://trac.wxwidgets.org/changeset/73237/wxPython/trunk/wx/lib/plot.py
[2] http://trac.wxwidgets.org/ticket/16590
[3] http://trac.wxwidgets.org/attachment/ticket/16425
https://gitorious.org/czk/czk/source/PKGBUILDs/python2-numpy-oldnumeric-hack/oldnumeric.py
Published as https://aur.archlinux.org/packages/python2-numpy-oldnumeric-hack/.