[MacPorts] #18047: py25-matplotlib - 0.98.5.2 - Graphics fails when using CocoaAgg
#18047: py25-matplotlib - 0.98.5.2 - Graphics fails when using CocoaAgg ------------------------------+--------------------------------------------- Reporter: krunk7@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: ------------------------------+--------------------------------------------- If CocoaAgg is set in the matplotlibrc, an error is thrown: "must have pyObjc installed" After installing py25-pyobjc2 (for Leopard 10.5), the following error is produced on render: :!python2.5 temp.py 2>&1| tee /var/folders/jT/jTtjyOlwG- iLpczTAAnRIE+++TM/-Tmp-/v182152/22 Traceback (most recent call last): File "temp.py", line 2, in <module> from pylab import * File "/opt/local/lib/python2.5/site-packages/pylab.py", line 1, in <module> from matplotlib.pylab import * File "/opt/local/lib/python2.5/site-packages/matplotlib/pylab.py", line 253, in <module> from matplotlib.pyplot import * File "/opt/local/lib/python2.5/site-packages/matplotlib/pyplot.py", line 75, in <module> new_figure_manager, draw_if_interactive, show = pylab_setup() File "/opt/local/lib/python2.5/site- packages/matplotlib/backends/__init__.py", line 25, in pylab_setup globals(),locals(),[backend_name]) File "/opt/local/lib/python2.5/site- packages/matplotlib/backends/backend_cocoaagg.py", line 26, in <module> from Foundation import * ImportError: No module named Foundation -- Ticket URL: <http://trac.macports.org/ticket/18047> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18047: py25-matplotlib - 0.98.5.2 - Graphics fails when using CocoaAgg ------------------------------+--------------------------------------------- Reporter: krunk7@… | Owner: ram@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: py25-matplotlib ------------------------------+--------------------------------------------- Changes (by macsforever2000@…): * owner: macports-tickets@… => ram@… * port: => py25-matplotlib Old description:
If CocoaAgg is set in the matplotlibrc, an error is thrown:
"must have pyObjc installed"
After installing py25-pyobjc2 (for Leopard 10.5), the following error is produced on render:
:!python2.5 temp.py 2>&1| tee /var/folders/jT/jTtjyOlwG- iLpczTAAnRIE+++TM/-Tmp-/v182152/22 Traceback (most recent call last): File "temp.py", line 2, in <module> from pylab import * File "/opt/local/lib/python2.5/site-packages/pylab.py", line 1, in <module> from matplotlib.pylab import * File "/opt/local/lib/python2.5/site-packages/matplotlib/pylab.py", line 253, in <module> from matplotlib.pyplot import * File "/opt/local/lib/python2.5/site-packages/matplotlib/pyplot.py", line 75, in <module> new_figure_manager, draw_if_interactive, show = pylab_setup() File "/opt/local/lib/python2.5/site- packages/matplotlib/backends/__init__.py", line 25, in pylab_setup globals(),locals(),[backend_name]) File "/opt/local/lib/python2.5/site- packages/matplotlib/backends/backend_cocoaagg.py", line 26, in <module> from Foundation import * ImportError: No module named Foundation
New description: If CocoaAgg is set in the matplotlibrc, an error is thrown: {{{ "must have pyObjc installed" }}} After installing py25-pyobjc2 (for Leopard 10.5), the following error is produced on render: {{{ :!python2.5 temp.py 2>&1| tee /var/folders/jT/jTtjyOlwG- iLpczTAAnRIE+++TM/-Tmp-/v182152/22 Traceback (most recent call last): File "temp.py", line 2, in <module> from pylab import * File "/opt/local/lib/python2.5/site-packages/pylab.py", line 1, in <module> from matplotlib.pylab import * File "/opt/local/lib/python2.5/site-packages/matplotlib/pylab.py", line 253, in <module> from matplotlib.pyplot import * File "/opt/local/lib/python2.5/site-packages/matplotlib/pyplot.py", line 75, in <module> new_figure_manager, draw_if_interactive, show = pylab_setup() File "/opt/local/lib/python2.5/site- packages/matplotlib/backends/__init__.py", line 25, in pylab_setup globals(),locals(),[backend_name]) File "/opt/local/lib/python2.5/site- packages/matplotlib/backends/backend_cocoaagg.py", line 26, in <module> from Foundation import * ImportError: No module named Foundation }}} -- Comment: Please remember to use WikiFormatting. -- Ticket URL: <http://trac.macports.org/ticket/18047#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18047: py25-matplotlib - 0.98.5.2 - Graphics fails when using CocoaAgg ------------------------------+--------------------------------------------- Reporter: krunk7@… | Owner: ram@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: py25-matplotlib ------------------------------+--------------------------------------------- Comment(by macsforever2000@…): {{{import Foundation}}} works fine for me in python 2.5 - tested in ipython2.5. Do you have python_select installed? Have you run: {{{ sudo python_select python25 }}} Maybe try re-installing py25-matplotlib now that py25-pyobjc2 is installed. -- Ticket URL: <http://trac.macports.org/ticket/18047#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18047: py25-matplotlib - 0.98.5.2 - Graphics fails when using CocoaAgg ------------------------------+--------------------------------------------- Reporter: krunk7@… | Owner: ram@… Type: defect | Status: new Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: py25-matplotlib ------------------------------+--------------------------------------------- Comment(by krunk7@…): Replying to [comment:2 macsforever2000@…]:
{{{import Foundation}}} works fine for me in python 2.5 - tested in ipython2.5. Do you have python_select installed? Have you run:
{{{ sudo python_select python25 }}} jkyle ~ % which python /opt/local/bin/python jkyle ~ % python --version Python 2.5.4 jkyle ~ %
Maybe try re-installing py25-matplotlib now that py25-pyobjc2 is
installed. I gave that a shot, still didn't work. Here's my current matplotlib variants args: The following ports are currently installed: py25-matplotlib @0.98.5.2_0+cairo+ghostscript+gtk2+latex+wxpython (active) I can even open up python (no ipython) and attempt to import Foundation, same error. jkyle ~ % sudo port install py25-pyobjc2 ---> Fetching py25-pyobjc2 ---> Verifying checksum(s) for py25-pyobjc2 ---> Extracting py25-pyobjc2 ---> Configuring py25-pyobjc2 ---> Building py25-pyobjc2 ---> Staging py25-pyobjc2 into destroot ---> Installing py25-pyobjc2 @2.0_0 ---> Activating py25-pyobjc2 @2.0_0 ---> Cleaning py25-pyobjc2 jkyle ~ % python Python 2.5.4 (r254:67916, Jan 3 2009, 15:50:29) [GCC 4.0.1 (Apple Inc. build 5490)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import Foundation Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named Foundation
-- Ticket URL: <http://trac.macports.org/ticket/18047#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18047: py25-matplotlib - 0.98.5.2 - Graphics fails when using CocoaAgg ------------------------------+--------------------------------------------- Reporter: krunk7@… | Owner: ram@… Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: py25-matplotlib ------------------------------+--------------------------------------------- Changes (by ram@…): * status: new => assigned Comment: Replying to [comment:2 macsforever2000@…]:
{{{import Foundation}}} works fine for me in python 2.5 - tested in ipython2.5.
Are you sure you aren't using the system python? AFAICT py25-pyobjc2 doesn't contain the Foundation modules, therefore they won't be available to the MacPorts python. {{{ $ port installed py25-pyobjc2 The following ports are currently installed: py25-pyobjc2 @2.0_0 (active) $ port contents py25-pyobjc2 | grep Foundation $ }}} -- Ticket URL: <http://trac.macports.org/ticket/18047#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18047: py25-matplotlib - 0.98.5.2 - Graphics fails when using CocoaAgg ------------------------------+--------------------------------------------- Reporter: krunk7@… | Owner: ram@… Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: py25-matplotlib ------------------------------+--------------------------------------------- Comment(by jmr@…): Foundation is provided by py25-pyobjc2-cocoa. -- Ticket URL: <http://trac.macports.org/ticket/18047#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18047: py25-matplotlib - 0.98.5.2 - Graphics fails when using CocoaAgg ------------------------------+--------------------------------------------- Reporter: krunk7@… | Owner: ram@… Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: py25-matplotlib ------------------------------+--------------------------------------------- Comment(by ram@…): Replying to [comment:5 jmr@…]:
Foundation is provided by py25-pyobjc2-cocoa.
Thanks, I'll look into supporting the CocoaAgg backend -- Ticket URL: <http://trac.macports.org/ticket/18047#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18047: py25-matplotlib - 0.98.5.2 - Graphics fails when using CocoaAgg ------------------------------+--------------------------------------------- Reporter: krunk7@… | Owner: ram@… Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: py25-matplotlib ------------------------------+--------------------------------------------- Comment(by krunk7@…): Replying to [comment:5 jmr@…]:
Foundation is provided by py25-pyobjc2-cocoa. I've verified that I'm not using any system bins/libs
Ok, installing py25-pyobjc2-cocoa gets rid of the Foundation import error. However, I get this: Traceback (most recent call last): File "set1.py", line 2, in <module> from pylab import * File "/opt/local/lib/python2.5/site-packages/pylab.py", line 1, in <module> from matplotlib.pylab import * File "/opt/local/lib/python2.5/site-packages/matplotlib/pylab.py", line 253, in <module> from matplotlib.pyplot import * File "/opt/local/lib/python2.5/site-packages/matplotlib/pyplot.py", line 75, in <module> new_figure_manager, draw_if_interactive, show = pylab_setup() File "/opt/local/lib/python2.5/site- packages/matplotlib/backends/__init__.py", line 25, in pylab_setup globals(),locals(),[backend_name]) File "/opt/local/lib/python2.5/site- packages/matplotlib/backends/backend_cocoaagg.py", line 54, in <module> class FigureCanvasCocoaAgg(FigureCanvasAgg): File "/opt/local/lib/python2.5/site- packages/matplotlib/backends/backend_cocoaagg.py", line 63, in FigureCanvasCocoaAgg start_event_loop.__doc__=FigureCanvasBase.start_event_loop_default.__doc__ NameError: name 'FigureCanvasBase' is not defined -- Ticket URL: <http://trac.macports.org/ticket/18047#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18047: py25-matplotlib - 0.98.5.2 - Graphics fails when using CocoaAgg ------------------------------+--------------------------------------------- Reporter: krunk7@… | Owner: ram@… Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: py25-matplotlib ------------------------------+--------------------------------------------- Comment(by ram@…): I also get this error when running you're example script. I'll enquire with upstream. -- Ticket URL: <http://trac.macports.org/ticket/18047#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18047: py25-matplotlib - 0.98.5.2 - Graphics fails when using CocoaAgg ------------------------------+--------------------------------------------- Reporter: krunk7@… | Owner: ram@… Type: defect | Status: assigned Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Keywords: | Port: py25-matplotlib ------------------------------+--------------------------------------------- Comment(by ram@…): Upstream has [http://sourceforge.net/mailarchive/forum.php?thread_name=88e473830901211909n... =matplotlib-users responded] to my query, there's a bug that is responsible for the backtrace which is now fixed in Matplotlib SVN. However it looks like there's not that much that can be done to get your example working, as that style of animation is no longer supported; they offer some alternatives maybe those can be of use. I'll get the port patched with the fix so we don't have to wait for a new release. -- Ticket URL: <http://trac.macports.org/ticket/18047#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#18047: py25-matplotlib - 0.98.5.2 - Graphics fails when using CocoaAgg -------------------------------+-------------------------------------------- Reporter: krunk7@… | Owner: ram@… Type: defect | Status: closed Priority: Normal | Milestone: Port Bugs Component: ports | Version: 1.7.0 Resolution: fixed | Keywords: Port: py25-matplotlib | -------------------------------+-------------------------------------------- Changes (by ram@…): * status: assigned => closed * resolution: => fixed Comment: backtrace fixed in r45788 -- Ticket URL: <http://trac.macports.org/ticket/18047#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts