Bug 907292

Summary: Python Basemap does not work
Product: [Fedora] Fedora Reporter: Elliott Sales de Andrade <quantum.analyst>
Component: python-basemapAssignee: Jef Spaleta <jspaleta>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 18CC: gwync, jspaleta
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-16 01:04:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Elliott Sales de Andrade 2013-02-04 03:28:28 UTC
Description of problem:
Importing the Basemap library into a Python script does not work. The error message suggests it was built against a different version of numpy.

Version-Release number of selected component (if applicable):
$ rpm -q python-basemap
python-basemap-0.99.4-14.fc18.x86_64
$ rpm -q python-matplotlib
python-matplotlib-1.2.0-8.fc18.x86_64
$ rpm -q numpy
numpy-1.7.0-0.5.rc1.fc18.x86_64

Steps to Reproduce:
1. Start python/ipython/pylab.
2. Enter: "from mpl_toolkits.basemap import Basemap" or try any of the other examples from the website.
  
Actual results:
/usr/lib64/python2.7/site-packages/mpl_toolkits/basemap/__init__.py in <module>()
     36 from matplotlib.lines import Line2D
     37 from matplotlib.transforms import Bbox
---> 38 import pyproj, sys, os, math, dbflib
     39 from proj import Proj
     40 import numpy as np

/usr/lib64/python2.7/site-packages/mpl_toolkits/basemap/pyproj.py in <module>()
     46 CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. """
     47 
---> 48 from _proj import Proj as _Proj
     49 from _geod import Geod as _Geod
     50 from _proj import _transform

/home/esalesde/code/c_numpy.pxd in _proj (src/_proj.c:3234)()

ValueError: numpy.dtype does not appear to be the correct type object

Expected results:
Import occurs without issue.

Additional info:
I don't know why it mentions ~/code/c_numpy.pxd, as that file does not seem to exist.

Comment 1 Elliott Sales de Andrade 2013-02-04 04:43:49 UTC
Probably the same as Bug 842870 on EPEL6. Would be nice if bug 870640 were fixed too.

Comment 2 Gwyn Ciesla 2013-02-04 16:44:38 UTC
Jef, any objection to my taking a crack at this and 870640?

Comment 3 Elliott Sales de Andrade 2013-02-05 04:25:39 UTC
FYI, if you want to update, then the patch in the spec needs to be made on this file instead:
lib/mpl_toolkits/basemap/pyproj.py

Comment 4 Gwyn Ciesla 2013-02-05 14:06:28 UTC
Thanks!

Jef, unless you object, I'll update this tomorrow for rawhide and f18.

Comment 5 Fedora Update System 2013-02-06 14:58:10 UTC
python-basemap-data-1.0.6-1.fc18,python-basemap-1.0.6-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/python-basemap-data-1.0.6-1.fc18,python-basemap-1.0.6-1.fc18

Comment 6 Fedora Update System 2013-02-08 02:31:01 UTC
Package python-basemap-data-1.0.6-1.fc18, python-basemap-1.0.6-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-basemap-data-1.0.6-1.fc18 python-basemap-1.0.6-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-2082/python-basemap-data-1.0.6-1.fc18,python-basemap-1.0.6-1.fc18
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2013-02-16 01:04:37 UTC
python-basemap-data-1.0.6-1.fc18, python-basemap-1.0.6-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.