Skip to content
This repository was archived by the owner on Dec 4, 2018. It is now read-only.

Error installing Cartopy on OS X #117

Closed
duncanwp opened this issue Oct 15, 2015 · 8 comments
Closed

Error installing Cartopy on OS X #117

duncanwp opened this issue Oct 15, 2015 · 8 comments

Comments

@duncanwp
Copy link

Hi,

I maintain a project which has Cartopy as a dependency and I've noticed that our OS X build is now failing since you rebuilt your package. The error I'm getting is:

ERROR: Failure: ValueError (numpy.dtype has the wrong size, try recompiling)

Traceback (most recent call last):
File "/Users/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/nose/loader.py", line 418, in loadTestsFromName
addr.filename, addr.module)
File "/Users/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/Users/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/Users/travis/build/cedadev/cis/cis/test/unit/aggregation/test_aggregate.py", line 5, in
from cis.aggregation.aggregate import Aggregate
File "/Users/travis/build/cedadev/cis/cis/aggregation/init.py", line 1, in
from aggregate import Aggregate
File "/Users/travis/build/cedadev/cis/cis/aggregation/aggregate.py", line 3, in
import iris.analysis
File "/Users/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/iris/init.py", line 107, in
import iris.cube
File "/Users/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/iris/cube.py", line 38, in
import iris.analysis
File "/Users/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/iris/analysis/init.py", line 59, in
from iris.analysis._area_weighted import AreaWeightedRegridder
File "/Users/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/iris/analysis/_area_weighted.py", line 22, in
from iris.analysis._interpolation import get_xy_dim_coords, snapshot_grid
File "/Users/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/iris/analysis/_interpolation.py", line 30, in
from iris.analysis.cartography import wrap_lons as wrap_circular_points
File "/Users/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/iris/analysis/cartography.py", line 31, in
import cartopy.img_transform
File "/Users/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/cartopy/init.py", line 110, in
import cartopy.crs
File "/Users/travis/miniconda/envs/test-environment/lib/python2.7/site-packages/cartopy/crs.py", line 37, in
from cartopy._crs import CRS, Geocentric, Geodetic, Globe, PROJ4_RELEASE
File "init.pxd", line 155, in init cartopy._crs (lib/cartopy/_crs.c:11291)
ValueError: numpy.dtype has the wrong size, try recompiling

Is this to do with removing the specific numpy versions perhaps?

Thanks

@ocefpaf
Copy link
Member

ocefpaf commented Oct 15, 2015

Hi @duncanwp. I guessing you had a numpy upgrade recently (to 1.10.0) and I am afraid that a cartopy compiled against that numpy will take a while. (See #116.)

Try downgrading your numpy with:

conda install numpy==1.9.3

@duncanwp
Copy link
Author

Thanks @ocefpaf, actually that was against numpy 1.9.3. You can see the full conda install here: https://travis-ci.org/cedadev/cis/jobs/83070011

@ocefpaf
Copy link
Member

ocefpaf commented Oct 15, 2015

Looking at the logs I notice that the issue is the opposite. You are getting a cartopy built against numpy 1.10.0 and conda is installing numpy 1.9.3. (Even though you are pinning 1.8.2 in your requirements file.)

The problem is that the cartopy you are getting does not have a numpy build string (for example np19). You have to either force numpy 1.10.0 and hope that everything has a version compiled against it. Or to force a cartopy version with the numpy 19 build string (for example cartopy-0.13.0-np19py34_0.)

@pelson Both Windows and OSX versions lost the numpy build string when this PR got merged. (See https://travis-ci.org/SciTools/conda-recipes-scitools/builds/84841566.)

However, that PR did not triggered a cartopy build directly. Note that the last PR to actively trigger a build did produce a Linux version with the proper numpy build string. I am guessing the culprit is a conda update. Not sure... I think that #116 will fix that as soon as we figure out how to get rid of the npNone string.

@duncanwp
Copy link
Author

Thanks for taking a look and getting back to me, unfortunately I'm still stuck with a broken build. I'm also concerned that users trying to install cartopy - or anything which depends on it, in OS X are going to run into the same problem.

Do you have an idea of when #116 will be fixed? In the meantime would it be possible to remove the new (I think we agree broken) cartopy builds from binstar?

@pelson
Copy link
Member

pelson commented Oct 23, 2015

In the meantime would it be possible to remove the new (I think we agree broken) cartopy builds from binstar?

I have done this now. Sensible suggestion. There may be still some other problems though. We need to get on top of this and a couple of other issues which have cropped up with recent conda[-build] releases.

@duncanwp
Copy link
Author

Great, thanks Phil. This has fixed the problem for me.

I now get an error from Iris - but I'll raise that on the other board!

@pelson
Copy link
Member

pelson commented Oct 23, 2015

Feel free to ping me there. 👍

@pelson
Copy link
Member

pelson commented Oct 23, 2015

Feel free to ping me there. 👍

P.S. I just removed the offending distributions on anaconda.org. Could you double check if that resolves the Iris issue too?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants