Setting up ArcPy with Jupyter Notebooks and Desktop 10.5.1

2677
5
Jump to solution
05-24-2019 09:05 AM
deleted-user-Yex3fllQlWKX
New Contributor

I am trying to set-up ArcPy, from ArcGIS Desktop, to be used within Jupyter Notebooks from an Anaconda Environment; yet, while this has worked on other computes, I am not able to import arcpy correctly on this new computer.

I have 64-bit geoprocessing installed along with Anaconda 3. From the Anaconda prompt, I create an environment, arcgis, with Python 2.7. I then create a file named DTBGGP64.PTH pointing to bin64, arcpy, and ArcToolbox\Scripts and save it at C:\Users\[USER NAME]\AppData\Local\Continuum\anaconda3\envs\arcgis\Lib\site-packages. From here, I install notebook ipykernel, have ipython install itself (i.e. `ipython kernelspec install-self`), and then install numpy. What am I missing?

0 Kudos
1 Solution

Accepted Solutions
deleted-user-Yex3fllQlWKX
New Contributor

Turns out the correct file name is not DTBGGP64.PTH as it was with other versions of ArcGIS, but arcgis-python-site-packages.pth. Hope this helps anyone looking for it.

View solution in original post

5 Replies
MichaelKelly3
New Contributor III

Hi John,

As stated in the system requirements, Python 3.5 or later is required to use the ArcGIS API for Python. As arcpy which comes with ArcMap, ArcCatalog, etc. is based on Python 2.7 it is incompatible - it can only be used with the ArcGIS Pro version of arcpy.

Mikie

deleted-user-Yex3fllQlWKX
New Contributor

Turns out the correct file name is not DTBGGP64.PTH as it was with other versions of ArcGIS, but arcgis-python-site-packages.pth. Hope this helps anyone looking for it.

njsnigdha42
New Contributor

Hi! How I solved the issue? I created a scripts using Arcpy (Arcmap 10.5) and I have jupyter (anaconda3). I am trying to import arcpy in jupyter to run the script. 

0 Kudos
njsnigdha42
New Contributor

How you*?

I created an environment for python 2.7 but it’s not working for me!

0 Kudos
MichaelKelly3
New Contributor III

I misread your message because it was in the ArcGIS API for Python group! Anyway looks like you got sorted anyway.

0 Kudos