Im having trouble installing geopandas (w/ fiona)
I have Arcpro 2.8 patch2 - which mentions that installation of geopandas has been fixed.
My experience is that after creating the python env clone, using the arcpro gui to install geopandas, fails without error message. Using the Python Command Prompt using "conda install geopandas" succeeds in the installation of geopandas but importing within python fails.
geopandas error:
fiona error:
Finally I created an env within the Python Command Prompt with "conda create --name another_env python". Then installed geopandas, and finally arcpy. This installation worked for geopandas but fiona is still not working.
Is there a recommended way to install geopandas and fiona to work along side arcpy?
Thanks!
Solved! Go to Solution.
Here are the specific versions that worked for me but my argis pro is still python 3.6.
Fiona 1.8.19
GDAL 3.2.3
I am doing all the install and uninstall with pip and .whl files in the command line. I have successfully installed this way on local machine and EC2 machine as well but it is tricky. The python version off the .whl need to match your python version. Other than version between GDAL and the Fiona I have not had any issues installing like this.
I have sometimes found I have better luck installing components at the same time in a new environment.
conda create -n geopandas arcpy geopandas fiona
I tried that this morning and it failed me. Import did this to me,
File "C:\Users\bwilson\AppData\Local\ESRI\conda\envs\geopandas\lib\site-packages\rtree\finder.py", line 67, in load
raise OSError("could not find or load {}".format(lib_name))
OSError: could not find or load spatialindex_c-64.dll
Leaving out arcpy gives me a DLL load error in pyproj instead. If I had time I would next try forcing it to use older versions of geopandas.
import pyproj
File "C:\Users\bwilson\AppData\Local\ESRI\conda\envs\geopandas\lib\site-packages\pyproj\__init__.py", line 49, in <module>
import pyproj.network
File "C:\Users\bwilson\AppData\Local\ESRI\conda\envs\geopandas\lib\site-packages\pyproj\network.py", line 10, in <module>
from pyproj._network import ( # noqa: F401 pylint: disable=unused-import
ImportError: DLL load failed while importing _network: The specified module could not be found.
Dang. This is a thorny issue. As much as I prefer using geopandas, I've managed to make things work okay with ESRI's Spatially Enabled Data Frames, so for now will use them instead of geopandas, at least for loading data. Hopefully there will eventually be an update of geopandas that can use the same GDAL version that arcpy does.
That could be the new Esri slogan! "It works okay."
I tried loading arcgis + geopandas + fiona on Debian 11 and it's broken there too. arcgis and gdal are using incompatible libpoppler libraries, so they won't work at the same time.
It's frustrating when you have to give up significant features and bug fixes in the open source libraries to make the Esri code work.
I've gotten to the point where I keep separate conda environments for each project, and in some few cases I keep multiple environments for one project to work around some of these problems.
conda install geopandas libtiff=4.0.10
from BUG-000128147: The GeoPandas module fails to install from the ArcGI.. (esri.com)
referencing
ArcGIS Notebooks in ArcGIS Pro (2.6) - Esri Community
and full circle.... it was supposed to be fixed in 2.8
Thanks for following up Dan.
However I just tried the following:
After running, the terminal spent over a half hour trying to do the installation, throwing up *lots* of warning messages about package conflicts with the versions installed in the default environment, then ultimately ended up not succeeding with the installation.
FYI, I'm using Pro 2.9
it may be time to give Tech Support a call. Sorting out the package issues may not be as simple as it seems.
In the interim, separate your geopandas stuff completely from anything that uses the arcpy environment since open source stuff (gdal, osgeo etc) originates from esri channels for their purposes
We used to work with ArcGIS pro 2.5.2 I decided to upgrade to ArcGIS pro 2.6 when it released. Well worst choice ever. I just could not get the environment to work anymore and it seems to be the same issue with Fiona as mentioned in this topic. Today after a long time I tried to create the environment with ArcGIS pro 2.9 still the same issues. Crazy this is still a thing after years. Not happy. 😞
Esri is big and slow moving, so even assuming they WANT to support open source projects, they will always be several steps behind. You just have to accept that, and understand that calling support won't change it.
The good part is that with tools like conda and docker available now, there are many ways to address the problem.