Skip to content

Conversation

@askingalot
Copy link

Fix for #227. Geopandas was failing because there was an ImportError when importing fiona. Doing a pip install -I fiona fixes the issue.

@ghost
Copy link

ghost commented Jul 9, 2018

I'm going to hold off on merging this because I think Fiona is being installed twice.

If you run the image and immediately uninstall fiona with conda uninstall fiona the issue is solved.

I know it is explicitly pip installed but I also believe it's being installed from conda-forge somewhere. Maybe as a dependency of another package? I'll take a look at the build log and see if I can find something.

@ghost
Copy link

ghost commented Jul 9, 2018

Looks like Fiona is indeed installed a second time from conda-forge by this command:
conda install -y -c conda-forge -c ioam holoviews geoviews && \

We tend to prefer conda installations so I will try removing the pip install lines and see what happens

@askingalot
Copy link
Author

askingalot commented Jul 9, 2018 via email

@ghost
Copy link

ghost commented Jul 9, 2018

Yeah, you're right. I just got the same error.

Found this issue which was never resolved: conda-forge/fiona-feedstock#65

The command conda install -y -c conda-forge -c ioam holoviews geoviews installs a bunch of dependencies (including geopandas and fiona). It's probably worth breaking that down into separate commands and/or finding an alternative method to install whichever one has fiona as a dependency

Jul 09 14:07:06 The following NEW packages will be INSTALLED:
Jul 09 14:07:06 
Jul 09 14:07:06     boost:           1.67.0-py36h3e44d54_0 conda-forge
Jul 09 14:07:06     boost-cpp:       1.67.0-h3a22d5f_0     conda-forge
Jul 09 14:07:06     cartopy:         0.16.0-py36_0         conda-forge
Jul 09 14:07:06     click-plugins:   1.0.3-py_1            conda-forge
Jul 09 14:07:06     cligj:           0.4.0-py36_0          conda-forge
Jul 09 14:07:06     descartes:       1.1.0-py_1            conda-forge
Jul 09 14:07:06     fiona:           1.7.12-py36_0         conda-forge
Jul 09 14:07:06     freexl:          1.0.5-hf837533_1      conda-forge
Jul 09 14:07:06     gdal:            2.2.2-py36hc209d97_1             
Jul 09 14:07:06     geopandas:       0.3.0-py_1            conda-forge
Jul 09 14:07:06     geoviews:        1.5.1-py_0            conda-forge
Jul 09 14:07:06     geoviews-core:   1.5.1-py_1            conda-forge
Jul 09 14:07:06     giflib:          5.1.4-h470a237_0      conda-forge
Jul 09 14:07:06     hdf4:            4.2.13-0              conda-forge
Jul 09 14:07:06     holoviews:       1.10.7-py_0           conda-forge
Jul 09 14:07:06     json-c:          0.12.1-0              conda-forge
Jul 09 14:07:06     kealib:          1.4.8-hfc679d8_0      conda-forge
Jul 09 14:07:06     krb5:            1.16.1-hbb41f41_0     conda-forge
Jul 09 14:07:06     libdap4:         3.19.1-0              conda-forge
Jul 09 14:07:06     libgdal:         2.2.2-h804cdde_1                 
Jul 09 14:07:06     libgfortran:     3.0.0-1                          
Jul 09 14:07:06     libkml:          1.3.0-hfce3912_7      conda-forge
Jul 09 14:07:06     libnetcdf:       4.4.1.1-10            conda-forge
Jul 09 14:07:06     libpq:           10.3-h1ad7b7a_0                  
Jul 09 14:07:06     libspatialindex: 1.8.5-hfc679d8_2      conda-forge
Jul 09 14:07:06     libspatialite:   4.3.0a-h72746d6_18               
Jul 09 14:07:06     munch:           2.3.2-py_0            conda-forge
Jul 09 14:07:06     netcdf4:         1.3.1-py36_1          conda-forge
Jul 09 14:07:06     openjpeg:        2.3.0-2               conda-forge
Jul 09 14:07:06     owslib:          0.16.0-py_0           conda-forge
Jul 09 14:07:06     poppler:         0.60.1-hc909a00_0                
Jul 09 14:07:06     poppler-data:    0.4.9-0               conda-forge
Jul 09 14:07:06     psycopg2:        2.7.5-py36_0          conda-forge
Jul 09 14:07:06     pyepsg:          0.3.2-py_1            conda-forge
Jul 09 14:07:06     pyproj:          1.9.5.1-py36_0        conda-forge
Jul 09 14:07:06     pysal:           1.14.3-py36_0         conda-forge
Jul 09 14:07:06     pyshp:           1.2.12-py_0           conda-forge
Jul 09 14:07:06     pyviz_comms:     0.1.1-py_0            conda-forge
Jul 09 14:07:06     rtree:           0.8.3-py36_0          conda-forge
Jul 09 14:07:06     shapely:         1.6.4-py36h164cb2d_1  conda-forge
Jul 09 14:07:06     util-linux:      2.21-0                           
Jul 09 14:07:06     xerces-c:        3.2.1-h5d6a6da_1      conda-forge

@askingalot
Copy link
Author

askingalot commented Jul 9, 2018 via email

@ghost
Copy link

ghost commented Jul 10, 2018

Thanks, I noticed that too. It's because there are two versions installed -- one by pip and one by conda (pip can uninstall both). Textbook case of why it can be problematic to use pip and conda :)

@askingalot
Copy link
Author

Any luck tracking down a good solution to this issue? ...as opposed to my hacky suggestion

@ghost
Copy link

ghost commented Jul 16, 2018

I haven't found a better solution yet. If I don't make progress today I will add your temporary fix until I can get something permanent figured out.

@wesg52
Copy link

wesg52 commented Jul 17, 2018

Has there been any progress? I cannot import geopandas for the PASSNYC competition

@ghost
Copy link

ghost commented Jul 17, 2018

@wesg52
Still working on it. We are now having build issues with Tensorflow which is preventing me from pushing the temp fix.

@askingalot
Copy link
Author

@crawforc3 I don't have any ideas on how to fix the tensorflow issue, but FWIW I will say that I encountered errors building Tensorflow on Mac OSX, but everything built properly (albeit with a LOT of warnings) once I switched to a Debian-based linux distro.

@ghost
Copy link

ghost commented Jul 18, 2018

Thanks @askingalot - we're already running a Debian-based image.

I opened this issue with TF tensorflow/tensorflow#20938

@ghost
Copy link

ghost commented Aug 14, 2018

Whew. Finally got this fixed!
https://www.kaggle.com/crawford/geopandas-test

@ghost ghost closed this Aug 14, 2018
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants