From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: python-matplotlib: should it propagate numpy? Date: Wed, 11 Nov 2015 17:40:07 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39223) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwYRc-0003ee-Kg for guix-devel@gnu.org; Wed, 11 Nov 2015 11:40:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZwYRU-0006X9-9o for guix-devel@gnu.org; Wed, 11 Nov 2015 11:40:24 -0500 Received: from venus.bbbm.mdc-berlin.de ([141.80.25.30]:32793) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwYRT-0006Wm-Tw for guix-devel@gnu.org; Wed, 11 Nov 2015 11:40:16 -0500 Received: from localhost (localhost [127.0.0.1]) by venus.bbbm.mdc-berlin.de (Postfix) with ESMTP id 7A69B3807C7 for ; Wed, 11 Nov 2015 17:40:14 +0100 (CET) Received: from venus.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (venus.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Q_HLkJa8VLy7 for ; Wed, 11 Nov 2015 17:40:08 +0100 (CET) Received: from HTCAONE.mdc-berlin.net (mab.citx.mdc-berlin.de [141.80.36.102]) by venus.bbbm.mdc-berlin.de (Postfix) with ESMTP for ; Wed, 11 Nov 2015 17:40:08 +0100 (CET) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel Hi Guix, with a profile containing python-2.7.10 and python2-matplotlib I did this: ~~~~~~~~~~~~~~~~~~~~~~~~ [rwurmus@guix-builder:~] $ export GI_TYPELIB_PATH="$HOME/.guix-profile/lib/girepository-1.0" [rwurmus@guix-builder:~] $ export PYTHONPATH=$HOME/.guix-profile/lib/python2.7/site-packages [rwurmus@guix-builder:~] $ 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 "", line 1, in 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 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 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 "", line 1, in 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