FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix for #227. Force re-install of fiona · askingalot/docker-python@81b116c · GitHub

Commit 81b116c

Browse files
committed
fix for Kaggle#227. Force re-install of fiona
1 parent c8985b3 commit 81b116c

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

‎Dockerfile‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,8 @@ RUN pip install scipy && \
240240
cd /usr/local/src && git clone git://github.com/nicolashennetier/pyeconometrics.git && \
241241
cd pyeconometrics && python setup.py install && \
242242
apt-get install -y graphviz && pip install graphviz && \
243-
apt-get install -y libgdal1-dev && GDAL_CONFIG=/usr/bin/gdal-config pip install fiona && pip install geopandas && \
243+
apt-get install -y libgdal1-dev && GDAL_CONFIG=/usr/bin/gdal-config && \
244+
pip install geopandas && \
244245
# Pandoc is a dependency of deap
245246
apt-get install -y pandoc && \
246247
cd /usr/local/src && git clone git://github.com/scikit-learn-contrib/py-earth.git && \
@@ -509,6 +510,10 @@ RUN pip install flashtext && \
509510
pip install pandasql && \
510511
pip install trackml && \
511512
cd /usr/local/src && git clone https://github.com/JohnLangford/vowpal_wabbit.git && ./vowpal_wabbit/python/conda_install.sh && \
513+
# Although fiona is installed as a dependency of geopandas (installed above),
514+
# importing geopandas led to an ImportError due to an error importing fiona.
515+
# Force installing fiona seems to fix the issue.
516+
pip install -I fiona && \
512517
##### ^^^^ Add new contributions above here ^^^^ #####
513518
# clean up pip cache
514519
rm -rf /root/.cache/pip/*

‎test_build.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
import pandas as pd
4343
print("Pandas imported ok")
4444

45+
import geopandas as gpd
46+
print('Geopandas imported ok')
47+
4548
from sklearn import datasets
4649
print("sklearn imported ok")
4750
iris = datasets.load_iris()

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL