Opened 13 years ago

Closed 13 years ago

#30421 closed defect (fixed)

py27-matplotlib-basemap @1.0.1_0, python import error: obsolete library reference

Reported by: brislawn@… Owned by: skymoo (Adam Mercer)
Priority: Normal Milestone:
Component: ports Version: 2.0.0
Keywords: Cc:
Port: py27-matplotlib-basemap

Description

I installed basemap back in June but recently upgraded a number of outdated ports. After doing so, I kept getting an ipython error message when trying to import Basemap:

In [1]: from mpl_toolkits.basemap import Basemap
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)

/Users/brislawn/Documents/Programs/VisualExploration/sandbox/<ipython console> in <module>()

/opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mpl_toolkits/basemap/__init__.py in <module>()
     43 import numpy.ma as ma
     44 from shapelib import ShapeFile
---> 45 import _geoslib, netcdftime
     46 
     47 # basemap data files now installed in lib/matplotlib/toolkits/basemap/data


ImportError: dlopen(/opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_geoslib.so, 2): Library not loaded: /opt/macports/lib/libgeos-3.2.2.dylib
  Referenced from: /opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/_geoslib.so
  Reason: image not found

The problem appears to be that libgeos is now at ver. 3.3.0 but for some reason this _geoslib.so file in Python.framework/ is still looking for 3.2.2, so evidently that version number is hardwired into _geoslib.so. I was able to fix the problem by uninstalling basemap (which removed _geoslib.so) and reinstalling it, but the normal "port upgrade outdated" procedure wasn't able to correct this problem. Maybe someone should look at how _geoslib.so is being generated during the build.

Thanks,

-Chris

Attachments (1)

Basemap_bug.txt (150.9 KB) - added by brislawn@… 13 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 13 years ago by jmroot (Joshua Root)

Owner: changed from macports-tickets@… to ram@…
Port: @1.0.1_0 removed

Please remember to cc the maintainer.

comment:2 Changed 13 years ago by skymoo (Adam Mercer)

Status: newassigned

comment:3 Changed 13 years ago by skymoo (Adam Mercer)

Resolution: fixed
Status: assignedclosed

revision bumped in r81267 to force linking against correct geos library

comment:4 Changed 13 years ago by brislawn@…

Cc: brislawn@… added

Cc Me!

comment:5 Changed 13 years ago by brislawn@…

Resolution: fixed
Status: closedreopened

Thanks for such prompt action. Sorry for not cc'ing the maintainer but I couldn't figure out what email address to cc. I did a "port upgrade outdated" today to build the new revision, py27-matplotlib-basemap-1.0.1_1, and after building and installing it I got the following error in ipython:

In [1]: from mpl_toolkits.basemap import Basemap---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)

/Users/brislawn/Documents/Programs/VisualExploration/sandbox/<ipython console> in <module>()

/opt/macports/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mpl_toolkits/basemap/__init__.py in <module>()
     38 from matplotlib.lines import Line2D
     39 from matplotlib.transforms import Bbox
---> 40 import pyproj, sys, os, math, dbflib
     41 from proj import Proj
     42 import numpy as np

ImportError: No module named dbflib

The complete build file is attached; a quick check with a text editor failed to find the string "dbflib" anywhere in the output of the build.

Thanks,

-Chris

Changed 13 years ago by brislawn@…

Attachment: Basemap_bug.txt added

comment:6 in reply to:  5 ; Changed 13 years ago by jmroot (Joshua Root)

Cc: brislawn@… removed

Replying to brislawn@…:

Sorry for not cc'ing the maintainer but I couldn't figure out what email address to cc.

port info py27-matplotlib-basemap, for future reference. This is mentioned in the ticket guidelines.

comment:7 Changed 13 years ago by skymoo (Adam Mercer)

I've seen this dbflib issue before, a rebuild usually fixes it. Can you try uninstalling and rebuilding and see of that fixes it?

comment:8 Changed 13 years ago by skymoo (Adam Mercer)

Just done a quick search on this issue and I may have found what's causing this. If it's correct a rebuild will fix it, but this is a hack and not the correct solution. I'm about to leave for a long weekend vacation but I'll look into fixing this properly on Tuesday.

comment:9 Changed 13 years ago by brislawn@…

Uninstalling and reinstalling py27-matplotlib-basemap did the trick (i.e., python can now import Basemap). Close this one out.

Thanks, you guys are the greatest!

Sincerely,

-Chris Brislawn

comment:10 in reply to:  6 Changed 13 years ago by brislawn@…

Replying to jmr@…:

Replying to brislawn@…:

Sorry for not cc'ing the maintainer but I couldn't figure out what email address to cc.

port info py27-matplotlib-basemap, for future reference. This is mentioned in the ticket guidelines.

Now I see it. It's under the bullet "Assign to:", which is for users with commit access and which steered me back up to the "Cc:" bullet. Maybe the directions "For tickets on ports, enter the email address..." belongs up under the "Cc:" bullet?

Thanks again for your help and patience; I'm new to this TracTickets system.

Sincerely,

-Chris

comment:11 Changed 13 years ago by skymoo (Adam Mercer)

Resolution: fixed
Status: reopenedclosed

This dbflib issue should be correctly fixed in r81785

Note: See TracTickets for help on using tickets.