I have tried to install geopandas via I python by running !pip install geopandas, but this fails with "python setup.py egg_info" failed with error code 1 and then Path to long directory. I read online that pyproj is required for geopandas and also tried to install it however no luck, similar error. Would anyone be able to point me in the right direction? Thank you.
Oh by the way, if this helps, I was able to install shapely, fiona, and Descartes using this method.
The whole process takes longer than you'd expect: it can be anywhere between 10 and 30 minutes.
To install GeoPandas and all its dependencies, we recommend to use the conda package manager. This can be obtained by installing the Anaconda Distribution (a free Python distribution for data science), or through miniconda (minimal distribution only containing Python and the conda package manager).
Thanks to the conda-forge community, geopandas
is actually pretty easy to install on all platforms using the conda package manager (or: its dependencies, as this is the difficulty).
If you have conda, it is just:
conda install -c conda-forge geopandas
To install conda, you can install the Anaconda python distribution or miniconda: http://conda.pydata.org/docs/download.html
See the GeoPandas docs for more details, specifically on how to create a new environment with GeoPandas installed with settings to ensure this always works: https://geopandas.org/install.html#creating-a-new-environment
Getting to work geopandas is unfortuntaly not easy, the problem is that the dependencies are partly not working and you have to use older versions of Fiona and GDAL. The following packages work stable together:
GDAL: 1.11.2 Fiona: 1.6.0 Geopandas: 0.1.0.dev-
To install on ubuntu:
sudo apt-get install build-essential python-all-dev wget http://download.osgeo.org/gdal/1.11.2/gdal-1.11.2.tar.gz tar xvfz gdal-1.11.2.tar.gz cd gdal-1.11.2 ./configure --with-python make sudo make install
In addition, some Linux distributions require the shared library cache to be updated after install:
sudo ldconfig
Fiona and geopandas can be installed classic by:
sudo pip install Fiona==1.6.0 sudo pip install geopandas
Under windows
As @Marcus Williams states:
Download Fiona and GDAL Windows Binaries corresponding your python environment (32, 64bit and 2.7 3.3 etc. (from http://www.lfd.uci.edu/~gohlke/pythonlibs/) and go in cmd with cd to directory where downloaded files are and install the .whl files using the command
pip install filename.whl
Finally:
pip install geopandas
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With