Opened 11 years ago

Closed 10 years ago

#38530 closed defect (worksforme)

py27-matplotlib @1.2.0 +python import error

Reported by: CK171080@… Owned by: seanfarley (Sean Farley)
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc:
Port: py-matplotlib

Description

I am using MacPorts on OS X 10.8 (Mountain Lion) and XCode 4.6.1. I am encountering problems with matplotlib and I have not found any solution browsing existing bug reports and the internet. Maybe there is someone around who can help...

I installed py27-matplotlib without any compilation error. However when trying to import matplotlib.pyplot in ipython (also installed via macports) I get the following error:

In [1]: import matplotlib.pyplot as plt
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-eff513f636fd> in <module>()
----> 1 import matplotlib.pyplot as plt

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/pyplot.py in <module>()
     95 
     96 from matplotlib.backends import pylab_setup
---> 97 _backend_mod, new_figure_manager, draw_if_interactive, _show = pylab_setup()
     98 
     99 @docstring.copy_dedent(Artist.findobj)

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/__init__.pyc in pylab_setup()
     23         backend_name = 'matplotlib.backends.%s'%backend_name.lower()
     24     backend_mod = __import__(backend_name,
---> 25                              globals(),locals(),[backend_name])
     26 
     27     # Things we pull in from all backends

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_macosx.py in <module>()
     19 
     20 import matplotlib
---> 21 from matplotlib.backends import _macosx
     22 
     23 

ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/_macosx.so, 2): Symbol not found: __cg_jpeg_resync_to_restart
  Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO
  Expected in: /opt/local/lib/libjpeg.9.dylib
 in /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO

I get the same error using the normal macports python. I also get the same error message trying to import Tkinter in python/ipython.

Anybody having an idea what's going on?

Change History (4)

comment:1 Changed 11 years ago by seanfarley (Sean Farley)

Hmmm, I can import both just fine. Maybe do a port -v selfupdate && port -v upgrade outdated?

comment:2 Changed 11 years ago by anddam (Andrea D'Amore)

There are several old references to the same issue with different ports both in Trac and mailing lists' archive, try checking those.

comment:3 Changed 11 years ago by jmroot (Joshua Root)

Cc: sean@… removed
Owner: changed from macports-tickets@… to sean@…
Port: py-matplotlib added

comment:10 Changed 10 years ago by seanfarley (Sean Farley)

Resolution: worksforme
Status: newclosed
Note: See TracTickets for help on using tickets.