Open PeterBetlem opened 4 years ago
Installing archook from Github worked for me.
pipenv install git+https://github.com/JamesRamm/archook.git#egg=archook
It did require me to create the registry keys manually though.
HKEY_LOCAL_MACHINE\SOFTWARE\ESRI\ArcGISPro
\PythonCondaEnv = arcgispro-py3
\PythonCondaRoot = C:\Users\<username>\AppData\Local\Programs\ArcGIS\Pro\bin\Python
\InstallDir = C:\Users\<username>\AppData\Local\Programs\ArcGIS\Pro
Where InstallDir is an Expandable String Value
and the other two are String Value
It would be cool to be able to pass these 3 values as arguments to archook.get_arcpy
The above plus "ImportError: Could not locate the ArcGIS directory on this machine" if disabling the pro parameter are found on a fresh conda python=3.6 with newly installed ArcGIS Pro 2.x (tried 2.1, 2.5, 2.5.1):
The issue is fixed by downloading a fresh archook copy from the github repo, and uncommenting/hardcoding the path:
May I suggest implementing a forced path argument as well that specifies "P"? :)
P.s., good job on this - I spent hours running into the constant issue of ArcGIS pro not wanting to copy the default environment; and this finally did the trick.