ArcPy import acgiscripting

8796
12
Jump to solution
09-30-2020 09:34 AM
Arthur_Morgan
New Contributor III

ArcPy import acgiscripting

I created a new environment in Conda and installed Python 3.6.9 along with certain modules including ArcPy in that new environment. Please note that I don't use ArcGIS Pro, I only installed the latest ArcPy so that I can use it in a particular Conda environment. I didn't install ArcGIS Pro first, I just installed the latest the latest arcpy version in an Anaconda environment.  I use ArcGIS, but I don't use its ArcPy because it's limited to Python 2.7. How can I resolve this issue? Now, when the script in Spyder tries to import arcpy, I get the following error:

File "~\Local\Programs\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 14, in <module>     import arcgisscripting  ImportError: DLL load failed: The specified procedure could not be found.

0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

There is more to "arcpy" than just arcpy and arcgisscripting.  There are checks to see if you have a version of Pro or arcmap installed along with them.  If you don't, then having the arcgisscripting module or the arcpy folder won't help.

You can install "arcgis" which has some parallel functionality if you don't have access to arcpy.


... sort of retired...

View solution in original post

12 Replies
DanPatterson
MVP Esteemed Contributor

There is more to "arcpy" than just arcpy and arcgisscripting.  There are checks to see if you have a version of Pro or arcmap installed along with them.  If you don't, then having the arcgisscripting module or the arcpy folder won't help.

You can install "arcgis" which has some parallel functionality if you don't have access to arcpy.


... sort of retired...
Arthur_Morgan
New Contributor III

I would highly recommend that arcpy should also be a standalone library that could work independently of ArcGIS. 

DanPatterson
MVP Esteemed Contributor

You could try posting it as an idea on ArcGIS Ideas‌ to see if it gains any traction.


... sort of retired...
Arne_Gelfert
Occasional Contributor III

I do think that while I love having a functioning Python environment at my disposal while doing ArcGIS work, getting it set up right and bridging the 2.x/3.x chasm that ESRI presents you with if you're working in an organization that uses both Desktop and Pro can go to ridiculous lengths.

But if you're using ArcMap and want to use arcpy, you should probably start with a fresh ArcGIS install and let it install 2.7 wherever it needs to be.  That won't be a conda environment. But maybe you can still point your IDE at it. If you're not using Pro, then I don't know if you have access to the arcgis module.

by Anonymous User
Not applicable

Hi Saad

I don't think there is "arcpy" library without ArcMap or ArcGIS Pro. You need to install one of them to get "license"

Regards,

Bing

0 Kudos
DanPatterson
MVP Esteemed Contributor

Bing Zheng That is the current situation, however, you never know... If the idea catches on, esri may have a new market


... sort of retired...
TueVu
by
New Contributor II

I would support the arcpy to be standalone since ArcGIS installation is limited at Window. 

Im trying to install Arcpy to our supercomputer running in CentOS platform but it is not allowing me to use conda to install that.

I am referring to this: anaconda.org/esri/arcpy, where the command is only available for window.

0 Kudos
KenPierce
New Contributor III

I also have this problem but I have both ArcPro 2.6 and ArcDesktop 10.7 installed and running but still can't get arcpy running in my conda environment.

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\__init__.py", line 74, in <module>
from arcpy.geoprocessing import gp
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in <module>
from ._base import *
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 14, in <module>
import arcgisscripting
ImportError: DLL load failed: The specified procedure could not be found.

0 Kudos
Iceage
by
New Contributor

Hi,

I believe we got similar issue with our environment setup with ArcGisPro 2.8. Please let me know what you did to fix yours. TIA,

 

Traceback (most recent call last):
File "c:\users\xyz\.conda\envs\arcgispro-py3-clone\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\xyz\.conda\envs\arcgispro-py3-clone\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\xyz\.conda\envs\arcgispro-py3-clone\Scripts\start_layer_unit_prod.exe\__main__.py", line 4, in <module>
File "c:\users\xyz\.conda\envs\arcgispro-py3-clone\lib\site-packages\lotech_tso_data_collector\layer_unit_prod.py", line 4, in <module>
from lotech_gis_tables import TsoArcGisLayers
File "c:\users\xyz\.conda\envs\arcgispro-py3-clone\lib\site-packages\lotech_gis_tables\__init__.py", line 17, in <module>
from lotech_arcgis import ArcGisData
File "c:\users\xyz\.conda\envs\arcgispro-py3-clone\lib\site-packages\lotech_arcgis\__init__.py", line 6, in <module>
from lotech_arcgis.arc_gis import ArcGisProject, GisUpload
File "c:\users\xyz\.conda\envs\arcgispro-py3-clone\lib\site-packages\lotech_arcgis\arc_gis.py", line 4, in <module>
import arcpy
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\__init__.py", line 90, in <module>
from arcpy.geoprocessing import gp
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in <module>
from ._base import *
File "C:\Program Files\ArcGIS\Pro\Resources\ArcPy\arcpy\geoprocessing\_base.py", line 14, in <module>
import arcgisscripting
File "c:\users\xyz\.conda\envs\arcgispro-py3-clone\lib\site-packages\arcgisscripting\__init__.py", line 128, in <module>
from ._arcgisscripting import *
ImportError: DLL load failed: The specified procedure could not be found.

0 Kudos