basemap broken with matplotlib 0.99.3?

I stumbled across a basemap demo a couple of days ago and was immediately
enchanted.

I can't get it to install nicely on a Windoze box with matplotlib 0.99.3.
When I try the famous
  from mpl_toolkits.basemap import Basemap
directive, I get
  In [1]: from mpl_toolkits.basemap import Basemap

···

---------------------------------------------------------------------------
ValueError Traceback (most recent call last)

C:\Documents and Settings\Bill.DC1\<ipython console> in <module>()

C:\Python26\lib\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

C:\Python26\lib\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

C:\Documents and Settings\Bill.DC1\c_numpy.pxd in _proj (src/_proj.c:3234)()

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

I tried manually installing many of the prerequisites (which should be
bundled) and also reinstalling MPL. But still no joy.

On my Linux box running 0.99.0, I was able to install basemap and run one of
the example codes. Works quite nicely.

Bill,

Unfortunately, I don't have a solution for you. I just wanted to chime in and say that I'm getting the same error. I'm on XP, py2.6, mpl0.99.3, np1.4.1, sp0.8.0b1. Basemap came from the latest Windows binary on Sourceforge.
-paul

···

-----Original Message-----
From: Bill Eaton [mailto:ee2@…3165…]
Sent: Wednesday, June 23, 2010 8:24 AM
To: matplotlib-users@lists.sourceforge.net
Subject: [Matplotlib-users] basemap broken with matplotlib 0.99.3?

I stumbled across a basemap demo a couple of days ago and was immediately
enchanted.

I can't get it to install nicely on a Windoze box with matplotlib 0.99.3.
When I try the famous
  from mpl_toolkits.basemap import Basemap
directive, I get
  In [1]: from mpl_toolkits.basemap import Basemap
-------------------------------------------------------------------------
--
ValueError Traceback (most recent call
last)

C:\Documents and Settings\Bill.DC1\<ipython console> in <module>()

C:\Python26\lib\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

C:\Python26\lib\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

C:\Documents and Settings\Bill.DC1\c_numpy.pxd in _proj
(src/_proj.c:3234)()

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

I tried manually installing many of the prerequisites (which should be
bundled) and also reinstalling MPL. But still no joy.

On my Linux box running 0.99.0, I was able to install basemap and run one
of
the example codes. Works quite nicely.

-------------------------------------------------------------------------
-----
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Bill,

Unfortunately, I don't have a solution for you. I just wanted to chime in and say that I'm getting the same error. I'm on XP, py2.6, mpl0.99.3, np1.4.1, sp0.8.0b1. Basemap came from the latest Windows binary on Sourceforge.
-paul
   
Bill,Paul: I'm pretty sure this is due to a binary incompatibilty between cython extensions compiled with numpy < 1.4 and numpy >= 1.4. The installer was probably created with numpy 1.2.1, and you have numpy 1.4.1. Unfortunately, I don't have the ability to make windows installers, so you'll either have to compile basemap yourself on windows, or downgrade your numpy.

-Jeff

···

On 6/25/10 12:21 PM, PHobson@...2792... wrote:

   

-----Original Message-----
From: Bill Eaton [mailto:ee2@…3165…]
Sent: Wednesday, June 23, 2010 8:24 AM
To: matplotlib-users@lists.sourceforge.net
Subject: [Matplotlib-users] basemap broken with matplotlib 0.99.3?

I stumbled across a basemap demo a couple of days ago and was immediately
enchanted.

I can't get it to install nicely on a Windoze box with matplotlib 0.99.3.
When I try the famous
   from mpl_toolkits.basemap import Basemap
directive, I get
   In [1]: from mpl_toolkits.basemap import Basemap
-------------------------------------------------------------------------
--
ValueError Traceback (most recent call
last)

C:\Documents and Settings\Bill.DC1\<ipython console> in<module>()

C:\Python26\lib\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

C:\Python26\lib\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

C:\Documents and Settings\Bill.DC1\c_numpy.pxd in _proj
(src/_proj.c:3234)()

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

I tried manually installing many of the prerequisites (which should be
bundled) and also reinstalling MPL. But still no joy.

On my Linux box running 0.99.0, I was able to install basemap and run one
of
the example codes. Works quite nicely.

-------------------------------------------------------------------------
-----
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
     

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
   
--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...259...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg

IIRC basemap contains Cython code, which would need to be "recythonized" with the latest Cython version in order to work with numpy 1.4.1. If you don't mind trying developer releases, use basemap 0.99.5 from <http://www.lfd.uci.edu/~gohlke/pythonlibs/#basemap>, which should work with numpy 1.4.1.

Christoph

···

On 6/25/2010 11:21 AM, PHobson@...2792... wrote:

Bill,

Unfortunately, I don't have a solution for you. I just wanted to chime in and say that I'm getting the same error. I'm on XP, py2.6, mpl0.99.3, np1.4.1, sp0.8.0b1. Basemap came from the latest Windows binary on Sourceforge.
-paul

-----Original Message-----
From: Bill Eaton [mailto:ee2@…3165…]
Sent: Wednesday, June 23, 2010 8:24 AM
To: matplotlib-users@lists.sourceforge.net
Subject: [Matplotlib-users] basemap broken with matplotlib 0.99.3?

I stumbled across a basemap demo a couple of days ago and was immediately
enchanted.

I can't get it to install nicely on a Windoze box with matplotlib 0.99.3.
When I try the famous
   from mpl_toolkits.basemap import Basemap
directive, I get
   In [1]: from mpl_toolkits.basemap import Basemap
-------------------------------------------------------------------------
--
ValueError Traceback (most recent call
last)

C:\Documents and Settings\Bill.DC1\<ipython console> in<module>()

C:\Python26\lib\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

C:\Python26\lib\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

C:\Documents and Settings\Bill.DC1\c_numpy.pxd in _proj
(src/_proj.c:3234)()

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

I tried manually installing many of the prerequisites (which should be
bundled) and also reinstalling MPL. But still no joy.

On my Linux box running 0.99.0, I was able to install basemap and run one
of
the example codes. Works quite nicely.

-------------------------------------------------------------------------
-----
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Success! (well, the import worked)

Christoph, thanks so much for the link, it is awesome! It can't be said enough that this is an awesome project and I'm so glad and thankful that it exists.

···

-----Original Message-----
From: Christoph Gohlke [mailto:cgohlke@…2143…]
Sent: Friday, June 25, 2010 11:37 AM
To: matplotlib-users@lists.sourceforge.net
Subject: Re: [Matplotlib-users] basemap broken with matplotlib 0.99.3?

IIRC basemap contains Cython code, which would need to be "recythonized"
with the latest Cython version in order to work with numpy 1.4.1. If you
don't mind trying developer releases, use basemap 0.99.5 from
<http://www.lfd.uci.edu/~gohlke/pythonlibs/#basemap>, which should work
with numpy 1.4.1.

Christoph

On 6/25/2010 11:21 AM, PHobson@…2792… wrote:
> Bill,
>
> Unfortunately, I don't have a solution for you. I just wanted to chime
in and say that I'm getting the same error. I'm on XP, py2.6, mpl0.99.3,
np1.4.1, sp0.8.0b1. Basemap came from the latest Windows binary on
Sourceforge.
> -paul
>
>> -----Original Message-----
>> From: Bill Eaton [mailto:ee2@…3165…]
>> Sent: Wednesday, June 23, 2010 8:24 AM
>> To: matplotlib-users@lists.sourceforge.net
>> Subject: [Matplotlib-users] basemap broken with matplotlib 0.99.3?
>>
>> I stumbled across a basemap demo a couple of days ago and was
immediately
>> enchanted.
>>
>> I can't get it to install nicely on a Windoze box with matplotlib
0.99.3.
>> When I try the famous
>> from mpl_toolkits.basemap import Basemap
>> directive, I get
>> In [1]: from mpl_toolkits.basemap import Basemap
>> ----------------------------------------------------------------------

>> –
>> ValueError Traceback (most recent call
>> last)
>>
>> C:\Documents and Settings\Bill.DC1\<ipython console> in<module>()
>>
>> C:\Python26\lib\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
>>
>> C:\Python26\lib\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
>>
>> C:\Documents and Settings\Bill.DC1\c_numpy.pxd in _proj
>> (src/_proj.c:3234)()
>>
>> ValueError: numpy.dtype does not appear to be the correct type object
>>
>> I tried manually installing many of the prerequisites (which should be
>> bundled) and also reinstalling MPL. But still no joy.
>>
>> On my Linux box running 0.99.0, I was able to install basemap and run
one
>> of
>> the example codes. Works quite nicely.
>>
>>
>>
>>
>> ----------------------------------------------------------------------

>> -----
>> ThinkGeek and WIRED's GeekDad team up for the Ultimate
>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
>> lucky parental unit. See the prize list and enter to win:
>> http://p.sf.net/sfu/thinkgeek-promo
>> _______________________________________________
>> Matplotlib-users mailing list
>> Matplotlib-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
> -----------------------------------------------------------------------
-------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>

-------------------------------------------------------------------------
-----
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users