guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

python-matplotlib: should it propagate numpy?


From: Ricardo Wurmus
Subject: python-matplotlib: should it propagate numpy?
Date: Wed, 11 Nov 2015 17:40:07 +0100

Hi Guix,

with a profile containing python-2.7.10 and python2-matplotlib I did
this:

~~~~~~~~~~~~~~~~~~~~~~~~
address@hidden:~] $ export 
GI_TYPELIB_PATH="$HOME/.guix-profile/lib/girepository-1.0"
address@hidden:~] $ export 
PYTHONPATH=$HOME/.guix-profile/lib/python2.7/site-packages
address@hidden:~] $ python
Python 2.7.10 (default, Oct  9 2015, 22:48:33) 
[GCC 4.9.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import matplotlib.pyplot as plt
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/__init__.py",
 line 180, in <module>
    from matplotlib.cbook import is_string_like
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/cbook.py",
 line 33, in <module>
    import numpy as np
ImportError: No module named numpy
>>> 
~~~~~~~~~~~~~~~~~~~~~~~~


So I installed python2-numpy into the same profile and tried again.
This time the import statement did pass, but I cannot actually plot
anything.


~~~~~~~~~~~~~~~~~~~~~~~~
>>> import matplotlib.pyplot as plt
>>> import numpy as np
>>> t = np.r_[0:5]
>>> plt.plot(t, t)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/pyplot.py",
 line 3092, in plot
    ax = gca()
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/pyplot.py",
 line 828, in gca
    ax =  gcf().gca(**kwargs)
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/pyplot.py",
 line 462, in gcf
    return figure()
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/pyplot.py",
 line 435, in figure
    **kwargs)
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtk3agg.py",
 line 110, in new_figure_manager
    return new_figure_manager_given_figure(num, thisFig)
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtk3agg.py",
 line 117, in new_figure_manager_given_figure
    canvas = FigureCanvasGTK3Agg(figure)
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtk3agg.py",
 line 25, in __init__
    backend_gtk3.FigureCanvasGTK3.__init__(self, figure)
  File 
"/home/rwurmus/.guix-profile/lib/python2.7/site-packages/matplotlib-1.4.2-py2.7-linux-x86_64.egg/matplotlib/backends/backend_gtk3.py",
 line 210, in __init__
    self._idle_event_id = GLib.idle_add(self.idle_event)
  File "/home/rwurmus/.guix-profile/lib/python2.7/site-packages/gi/types.py", 
line 44, in function
    return info.invoke(*args)
TypeError: Error invoking GLib.idle_add: Unexpected value for argument 
'function'
>>> 
~~~~~~~~~~~~~~~~~~~~~~~~


Does anyone know how to make this work?  Is this related to bug #20888?

~~ Ricardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]