I have an issue with the arcpy module to run standalone scripts.
I have installed the latest version of ArcGIS Pro and ArcMap desktop.
Also, installed the latest version of Spyder (Anaconda)(64-bit,python3.7).
I have tested "import arcpy" and it says ***ModuleNotFoundError: No module named 'arcpy' ***
Had some search on the internet how to add the arcpy module to the spyder but could not fix it. (by browsing the path of python folder)
please, can you help me to figure out how it works?
note: as I know if I have ArcGIS pro I can use Python 3.7, not 2.7 (attached, how my python folder looks like)
Solved! Go to Solution.
You should have used the conda distribution that comes with ArcGIS Pro which is 'pinned' to python 3.6. You probably tried to download anaconda for python 3.7 from the anaconda site which isn't going to be the same as the distribution that came with Pro. A number of packages won't work with that distribution... arcpy is one.
The solution is to completely remove all vestiges of what you have done and install spyder in a clone or in the default esri distribution if you have full administrator rights. Skip python 3.7 for now (I have looked into this BTW)
Thank you Dan, I want to ask about ArcMap desktop for 10.3-10.7 versions, can I use spyder for this also? if yes, how?
(ArcGIS pro, I tried and it is working, but most of the codes that I found is for python 2.7)
great thanks for your valuable information
I don't use arcmap anymore, but when I did, I used python 3. For the most part, you just need to be careful that 'print' is now different but it can be handled with … from __future__ import print_statement, division
and a few others
There a few differences in arcpy between arcmap and ArcGIS pro, but they can be readily caught using the code snippets in the 10.x and Pro help files.
It would be a pain to set up another installation... however, you can set up spyder to run different pythons... refer to their website, I just never tried it