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.
Hi All,
I installed geopandas after updating to ArcGIS Pro 3.0, and the issue I had above with read_file() has disappeared.
Notably, when I install geopandas, instead of installing fiona 1.8.13, it installs fiona 1.8.21. Also, gdal version in Pro 3.0 is gdal 3.4.0 instead of 3.3.0.
So for what it's worth, updating to Pro 3.0 seems to have fixed the issue for me--though I'm bummed at the prospect that this will likely crop up again when ESRI releases future updates Pro updates.
geopandas 0.9 ?
fiona 1.8.13.0 ?
yes that is correct.
Is there any follow-up on this topic? I had the same issue with Pro 2.8 and still have it with Pro 2.9.
These are the versions of geopandas and fiona that I have:
And this is what happens when I import fiona or run geopandas.read_file()
As a test, I installed geopandas in a non-arcgis environment and it works fine
In the non-arcgis environment (created by running conda create geopandas-test), these are the versions of fiona/geopandas after running conda install geopandas:
The versions and channels for geopandas and fiona look to be the same in both the arcgis and non-arcgis environments, but gdal is different: In the arcgis cloned env, gdal is version 3.3.0, while in the non-arcgis env it's 3.0.2. Not sure if this is the reason for the error, but worth noting.
With this information, is there any way to get geopandas and fiona to work in an arcgis environment? I actually can use some geopandas functions, but if it needs fiona it won't work (e.g., geopandas.read_file() requires fiona so I cannot use it currently or it gives me an error).
Thank you,
gdal 3.3.0
and I am not sure if osgeo is a full install (if you are familiar with it, compare this folder from base to your clone's )
C:\...Your_Install_folder...\bin\Python\envs\arcgispro-py3\Lib\site-packages\osgeo
If it works in the clone, stick with it until python moves beyond 3.7 at least
Hi Dan,
I compared the osgeo folders for the two environments:
For the arcgis-pro based environment (clone of arcgispro-py3; fiona doesn't load on it):
Then for the non-arcgis environment (in which fiona correctly loads):
The most notable difference is that the arcgis env contains a script utils.py,while the non-arcgis version does not contain it.
You will have to examine the __init__ and utils scripts to see what they contain
I have had this issue before, I think you should get the precompiled whl files from here https://www.lfd.uci.edu/~gohlke/pythonlibs/ . I downloaded gdal,fiona and geopandas. First I uninstalled the gdal version that comes with arcgisPro then I installed gdal,fiona then geopandas. I have only had luck installing these through command line. Make sure you download the precompiled library for your specific python version and the versions of fiona and gdal must be compatible.
Hi Gary,
Thanks for the tip. I tried the following:
However, running step 3 said there were various conflicts between gdal 3.0.2 and the other packages in the Pro environment. Specific conflicts are listed below, but critically, it looks like arcpy and arcgis have inconsistencies, and since my goal is to have arcpy and fiona work in the same env, I cannot get rid of arcpy.
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:
- esri/win-64::arcgis==1.9.1=py37_2327
- esri/win-64::arcpy==2.9=py37_arcgispro_32704
- defaults/win-64::argon2-cffi==20.1.0=py36he774522_1
- defaults/win-64::ipykernel==5.3.4=py36h5ca1d4c_0
- defaults/win-64::ipywidgets==7.4.2=py37_0
- esri/noarch::jupyterlab==2.2.7=py_0
- defaults/noarch::jupyterlab_server==1.2.0=py_0
- esri/noarch::jupyter_console==6.4.0=py_1
- esri/noarch::jupyter_contrib_core==0.3.3=py_4
- esri/noarch::jupyter_contrib_nbextensions==0.5.1=py_23
- esri/noarch::jupyter_highlight_selected_word==0.2.0=py_4
- esri/noarch::jupyter_latex_envs==1.4.6=py_3
- esri/noarch::jupyter_nbextensions_configurator==0.4.1=py_3
- defaults/win-64::notebook==6.1.1=py36_0
- esri/win-64::pro_notebook_integration==2.9=py37_9
- defaults/win-64::widgetsnbextension==3.4.2=py37_0
Is there any reason why the pre-compiled WHL files are different from conda forge? And did you run into the same conflicts?
Thanks,
Thanks
arcpy and gdal and numpy are tied together for a variety of functions and functionality.
You would be ill advised to mess with the linkage