Opened 7 years ago

Closed 7 years ago

#53346 closed defect (fixed)

py27-matplotlib for matplotlib 2.0.0 cannot import pyplot

Reported by: jolivetr Owned by: seanfarley (Sean Farley)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: michaelld (Michael Dickens)
Port: py-matplotlib

Description

Dear all,

I just upgraded matplolib from 1.5.3 to 2.0.0 using the port upgrade command. However, when importing, matplotlib.pyplot requires a functools.lru_cache or a functools32.lru_cache. These do not exists and pyplot cannot be imported.

Is that a bug or have I done something wrong? R

PS: Mac Pro running El Capitan. Macports is up to date.

Change History (10)

comment:1 Changed 7 years ago by mf2k (Frank Schima)

Keywords: matplotlib removed
Owner: set to seanfarley
Port: py-matplotlib added; py27-matplotlib removed
Status: newassigned

In the future, please Cc the port maintainers (port info --maintainers py27-matplotlib), if any.

comment:2 Changed 7 years ago by mf2k (Frank Schima)

I do not see this problem.

comment:3 Changed 7 years ago by mf2k (Frank Schima)

Please show the exact commands you are using starting from the bash prompt.

comment:4 Changed 7 years ago by mf2k (Frank Schima)

Never mind. This has apparently been fixed already. Please selfupdate and upgrade outdated and try again.

comment:5 Changed 7 years ago by jolivetr

I still have the issue. I just did selfupdate and upgrade outdated:

gorilla 15:29:22 ~ > sudo port selfupdate
---> Updating MacPorts base sources using rsync
MacPorts base version 2.3.5 installed,
MacPorts base version 2.3.5 downloaded.
---> Updating the ports tree
sudo port upgrade outdated
---> MacPorts base is already the latest version

The ports tree has been updated. To upgrade your installed ports, you should run

port upgrade outdated

gorilla 15:29:39 ~ > sudo port upgrade outdated
Nothing to upgrade.

Then, my problem is:

gorilla 15:29:40 ~ > python Python 2.7.13 (default, Dec 18 2016, 05:35:35) [GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin Type "help", "copyright", "credits" or "license" for more information. import matplotlib.pyplot

Traceback (most recent call last):

File "<stdin>", line 1, in <module> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/pyplot.py", line 29, in <module>

import matplotlib.colorbar

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/colorbar.py", line 36, in <module>

import matplotlib.contour as contour

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/contour.py", line 22, in <module>

import matplotlib.font_manager as font_manager

File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/font_manager.py", line 67, in <module>

from functools32 import lru_cache

ImportError: No module named functools32

comment:6 Changed 7 years ago by mf2k (Frank Schima)

In the future, please use WikiFormatting so your output is readable.

What is the output of the following commands?

port installed py27-matplotlib
which python

comment:7 Changed 7 years ago by jolivetr

I get:

gorilla 15:37:46 ~ > port installed py27-matplotlib
The following ports are currently installed:
  py27-matplotlib @1.5.3_0+cairo
  py27-matplotlib @2.0.0_0+cairo (active)
gorilla 15:37:47 ~ > which python
/opt/local/bin/python 

When I activate version 1.5.3 of matplotlib, I have no problem

comment:8 Changed 7 years ago by mf2k (Frank Schima)

The problem is that you don't have the newest revision of it yet. You will have to wait until portindex syncs to get it. This happens every 30 minutes or so.

$ port installed py27-matplotlib
The following ports are currently installed:
  py27-matplotlib @2.0.0_1+cairo (active)

comment:9 Changed 7 years ago by jolivetr

Then it makes sense. I'll wait. Thanks for the help.

comment:10 Changed 7 years ago by jmroot (Joshua Root)

Cc: michaelld added
Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.