Select to view content in your preferred language

error : no module named arcpy

5179
12
Jump to solution
01-06-2016 04:31 PM
ben_abdallahmhd
Deactivated User

Hi, i have a problem with arcpy when i try to import it in a script with idle the message

no "module named arcpy" appear. But when i run it directly in arcgis.

The second problem is the no recognition of the feqtureclqss . the message that appearr is : the featureclass doesntexist.

Remarque I use ArcSDE connection and ArcGIS 10.1

Thank you

0 Kudos
12 Replies
DanPatterson_Retired
MVP Emeritus

Thanks for the update... I will add Rebecca's solution to the list of possible solutions

0 Kudos
RebeccaStrauch__GISP
MVP Emeritus

Are you using IDLE to edit withint ArcGIS.  See

40263 - Change the default editor for a Python Toolbox from Notepad to IDLE

for how to set up IDLE as your default editor.  If using a standalone version of IDLE, there is probably a system setting you need to setup for the python path.  Here are some tips for finding the correct path

Locating Python and adding it to your system Path | Python, GIS and stuff…

This link may also help in resolving your issue, although it mention 10.0 not 10.1

arcgis 10.0 - issues importing arcpy in Python IDLE - Geographic Information Systems Stack Exchange

Tip from that thread...

Tip:

If importing ArcPy produces either of the following errors, the required modules could not be found: ImportError: No module named arcpy ImportError: No module named arcgisscripting

To address this, browse using Windows Explorer to the python26\Lib\site-packages folder and add or edit the Desktop10.pth file. The file should contain the two lines shown below (corrected to your system's path if they do not match):

  • C:\Program Files\ArcGIS\Desktop10.0\arcpy
  • C:\Program Files\ArcGIS\Desktop10.0\bin
0 Kudos
ben_abdallahmhd
Deactivated User

Hi Rebecca, thank tou

I will do this or reinstall ArcGis!

0 Kudos