Arcpy required for from_featureclass() method?

481
3
Jump to solution
05-13-2022 01:15 PM
JohnHuillery1
Occasional Contributor

Is arcpy required to use the from_featureclass() method from the ArcGIS for Python API? I'm attempting to use it on spatially enabled dataframes in an environment that does not have arcpy installed and I'm getting invalid input dataset errors.

I am attempting to read from SDE.

0 Kudos
1 Solution

Accepted Solutions
davedoesgis
Occasional Contributor III

According to this link, it says:

You must have fiona installed if you use the from_featureclass() method to read a feature class from FileGDB with a Python interpreter that does not have access to ArcPy.

 

View solution in original post

3 Replies
jcarlson
MVP Esteemed Contributor

It shouldn't, I use that function quite often on non-arcpy envs. Admittedly, I've only done this with FGDBs.

When I used the ArcGIS Python API against an enterprise geodatabase, I used pandas.read_sql to do it.

- Josh Carlson
Kendall County GIS
0 Kudos
DanPatterson
MVP Esteemed Contributor

C:\...install_folder...\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\features\geo\_io\fileops.py

line 470 -

There are checks for arcpy, no arcpy but has pyshp (for shapefiles) and for fiona

So read through the code for fileops and its import tree, but it appears that pyshp and fiona handle imports for spatially enabled dataframes if you don't have arcpy.  

 


... sort of retired...
0 Kudos
davedoesgis
Occasional Contributor III

According to this link, it says:

You must have fiona installed if you use the from_featureclass() method to read a feature class from FileGDB with a Python interpreter that does not have access to ArcPy.