Hi
I have followed instructions about making anaconda compatible with Esri's arcpy implementation in
In particular I have imported all the .pth files from python to anaconda and vice versa (but I have put them in the site-packages folders, as I found some other instructions about that.)
When I open a jupyter notebook and try the import statement i.e.
import arcpy
I get the following error:
ImportError Traceback (most recent call last)
<ipython-input-1-50d283eebbb3> in <module>()
----> 1 import arcpy
C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\__init__.py in <module>()
20 import numpy
21
---> 22 from arcpy.geoprocessing import gp
23 from arcpy.geoprocessing import env
24 from arcpy.geoprocessing._base import gptooldoc as _gptooldoc
C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy\arcpy\geoprocessing\__init__.py in <module>()
12 #
13 #email:
---> 14 from _base import *
ImportError: No module named '_base'
I am on ArcGIS Desktop 10.5 and anaconda 3. Note however that I also have ArcGIS for Server, ArcGIS Pro and Portal for ArcGIS installed in the same environment.
I have tried to add several path entries into the .pth file I import into the site-packages folder of anaconda, but some of them stop the jupyter notebook from firing up altogether.
By default, by desktop.pth file from Esri't python installation contains the following entries:
C:\Program Files (x86)\ArcGIS\Desktop10.5\bin
C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcPy
C:\Program Files (x86)\ArcGIS\Desktop10.5\ArcToolBox\Scripts
I have executed, in the Esri environment:
import sys
print.sys.path
and then added all the returned path entries to the desktop.pth file in the anaconda site-packages folder, but when I do this, the jupyter notebook fails to open.
Can anyone help?
Thanks
Hugo