From 81b116ceb6f3bd281f85dac2e43fecc1bbea050e Mon Sep 17 00:00:00 2001 From: Andy Collins Date: Thu, 5 Jul 2018 08:09:41 -0500 Subject: [PATCH] fix for #227. Force re-install of fiona --- Dockerfile | 7 ++++++- test_build.py | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bd635250..c8686195 100644 --- a/Dockerfile +++ b/Dockerfile @@ -240,7 +240,8 @@ RUN pip install scipy && \ cd /usr/local/src && git clone git://github.com/nicolashennetier/pyeconometrics.git && \ cd pyeconometrics && python setup.py install && \ apt-get install -y graphviz && pip install graphviz && \ - apt-get install -y libgdal1-dev && GDAL_CONFIG=/usr/bin/gdal-config pip install fiona && pip install geopandas && \ + apt-get install -y libgdal1-dev && GDAL_CONFIG=/usr/bin/gdal-config && \ + pip install geopandas && \ # Pandoc is a dependency of deap apt-get install -y pandoc && \ cd /usr/local/src && git clone git://github.com/scikit-learn-contrib/py-earth.git && \ @@ -509,6 +510,10 @@ RUN pip install flashtext && \ pip install pandasql && \ pip install trackml && \ cd /usr/local/src && git clone https://github.com/JohnLangford/vowpal_wabbit.git && ./vowpal_wabbit/python/conda_install.sh && \ + # Although fiona is installed as a dependency of geopandas (installed above), + # importing geopandas led to an ImportError due to an error importing fiona. + # Force installing fiona seems to fix the issue. + pip install -I fiona && \ ##### ^^^^ Add new contributions above here ^^^^ ##### # clean up pip cache rm -rf /root/.cache/pip/* diff --git a/test_build.py b/test_build.py index db2ef2f8..bb7a7b55 100644 --- a/test_build.py +++ b/test_build.py @@ -42,6 +42,9 @@ import pandas as pd print("Pandas imported ok") +import geopandas as gpd +print('Geopandas imported ok') + from sklearn import datasets print("sklearn imported ok") iris = datasets.load_iris()