Hello,
I've been troubleshooting this for hours and have figured out the problem, but not the solution. So, I'm trying to load ArcPy using 'import arcpy' in IDLE 3.10.11 for ArcGIS Pro and receiving.
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import arcpy
ModuleNotFoundError: No module named 'arcpy'
I have an academic Advanced license for ArcGIS Pro. So, this is not an issue due to licensing. I figured out that the issue likely stems from my Environmental Variables and System pathing. I have secondary installs of Python that I work in using Anaconda & Jupyter notebooks outside of ArcGIS Pro. These were installed BEFORE ArcGIS Pro though. Yet, they seem to be stomping on the ArcGIS Pro system path.
This was discovered by running the below code.
import sys
print(sys.path)
Which showed me that my IDLE is not pointed to my ArcGIS Pro folders remotely.
Here is the result of my System Path:
['', 'C:\\WINDOWS\\system32', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64\\python310.zip', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64\\DLLs', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64\\lib', 'C:\\Users\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.10', 'C:\\Users\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10\LocalCache\\local-packages\\Python310\\site-packages', 'C:\\Users\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10\LocalCache\\local-packages\\Python310\\site-packages\\win32', 'C:\\Users\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10\\LocalCache\\local-packages\\Python310\\site-packages\\win32\\lib', 'C:\\Users\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.10\\LocalCache\\local-packages\\Python310\\site-packages\\Pythonwin', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64', 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64\\lib\\site-packages']
I've attempted the below to troubleshoot the issue:
- Append new system path line items to the correct paths >> ArcPy still wouldn't load
- Uninstall ArcGIS Desktop from my system >> I don't have a license for it anymore, or ever use it. So, I figured I'd give it a go.
- Performed a whole clean uninstall/reinstall of ArcGIS Pro (renaming folders in the C: Drive and Registry as OLD) >> ArcPy STILL won't load
What I think I need to do is find a way to point to the correct path FIRST. But I can't find any documentation on what the correct path IS. OR, how to point to it. Could someone please help me?