Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#57562 closed defect (fixed)

py-matplotlib-basemap 1.1.0_0 incompatible with matplotlib 3.0.1_0

Reported by: EJFielding (Eric Fielding) Owned by: reneeotten <reneeotten@…>
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: Cc: Schamschula (Marius Schamschula)
Port: py-matplotlib-basemap

Description

The present version of matplotlib-basemap is trying to import something that seems to be no longer present in matplotlib. These are the versions that I have installed:

py36-matplotlib-basemap @1.1.0_0
py36-matplotlib @3.0.1_0+cairo+webagg (active)

This is the last part of my error trace:

    import mpl_toolkits.basemap as basemap
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mpl_toolkits/basemap/__init__.py", line 17, in <module>
    from matplotlib.cbook import is_scalar, dedent
ImportError: cannot import name 'is_scalar'

Change History (5)

comment:1 Changed 6 years ago by EJFielding (Eric Fielding)

I found this on the Basemap Github (https://github.com/matplotlib/basemap/issues/424). The issue was fixed in release 1.2.0 of Basemap.

comment:2 Changed 6 years ago by EJFielding (Eric Fielding)

I don't see anybody listed as maintainer for the py36-matplotlib-basemap, so I don't know who to "cc:" on this. The py36-matplotlib port was updated to version 3.0.2_0, and the basemap module version 1.1.0 is still incompatible. One one of my Macs, I was able to activate the older version of py36-matplotlib, but on the other I already ran "port reclaim" and deleted it so I can't run my Python code that tries to import the basemap module. I tried a quick fix to the

/opt/local/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mpl_toolkits/basemap/__init__.py

code by deleting the import of "is_scalar", but it then failed further down. It seems that the only fix is to update the Basemap code do 1.2.0 or later.

comment:3 Changed 6 years ago by reneeotten (Renee Otten)

hi Eric,

it seems that your diagnosis is correct and that updating the port to 1.2.0 fixes the issue. I updated the port in PR3119, it passes the tests and does not throw an error anymore when you import the package. Besides that I have no knowledge of the package and don't really know how to test anything else - but I hope this helps.

comment:4 Changed 6 years ago by reneeotten <reneeotten@…>

Owner: set to reneeotten <reneeotten@…>
Resolution: fixed
Status: newclosed

In 9385b63054fcddb8dfa47b0c206b9b374fd72247/macports-ports (master):

py-matplotlib-basemap: update to 1.2.0

  • add py37 subport
  • update dependencies
  • enable tests

Closes: #57562

comment:5 Changed 6 years ago by EJFielding (Eric Fielding)

Hi Renee,

Thanks so much for the update of Basemap to 1.2. Now it works for me again.

Note: See TracTickets for help on using tickets.