I am using PyScripter IDE for Python. When I run an arcpython script on PyScripter, I get the error that says "ModuleNotFoundError:no module named 'arcpy'" . However, the arcpython script runs fine in Python window embedded with Arcmap. I have attached the snapshots of error and the sys.path.
How do I configure this issue in PyScripter so that it will understand I am using arcpython modules?
Thanks,
Solved! Go to Solution.
uninstall python 3.6, it is interfering with Pyscripter's ability to access arcpy.
You won't be able to use python 3.6 until you are working with ArcGIS Pro (currently in 3.5).
you should uninstall/reinstall Pyscripter as well since you don't want to go messing around with registry edits.
If you really have a burning desire to have different versions of python running, install ArcGIS Pro, you will get an Anaconda distribution of python 3.5. From there you can create separate installations through the conda manager.
uninstall python 3.6, it is interfering with Pyscripter's ability to access arcpy.
You won't be able to use python 3.6 until you are working with ArcGIS Pro (currently in 3.5).
you should uninstall/reinstall Pyscripter as well since you don't want to go messing around with registry edits.
If you really have a burning desire to have different versions of python running, install ArcGIS Pro, you will get an Anaconda distribution of python 3.5. From there you can create separate installations through the conda manager.
Thank you Dan. Uninstalling python 3.6 and uninstalling/reinstalling PyScripter solved the issue.
ArcPy questions are best addressed in https://community.esri.com/community/developers/gis-developers/python?sr=search&searchId=b4ef167e-68... space, not https://community.esri.com/groups/arcgis-python-api?sr=search&searchId=b4ef167e-6809-48ce-9de1-64a7a....
What are your settings for Python interpreter in PyScripter? If you have PyScripter configured to use the Python interpreter bundled with ArcGIS Desktop, there should be no issue importing ArcPy.
As Joshua mentions its likely a config issue within pyscripter.
Your PC can have as many versions of Python installed as you would like. ArcGIS installs a version, so does ArcGIS pro, so does other software, you may even have just installed one yourself.
Only the version of Python that ArcGIS installed itself can use ArcPy.
Your pyscripter is likely set to use one of the other versions of python that exist on your computer. This setting is called the "Interpreter", look to change that.
I can see in your "Environment Settings" attachment, that the python version 36 does not appear to be one of the ArcGIS python installs.