Error: ImportError: No module named arcpy
【相关信息】
Article ID: 45618
Software:
ArcGIS for Server 10.1, 10.2.1, 10.2.2, 10.3, 10.3.1, 10.2
Platforms:
Windows Windows 7, Windows 8, Server 2012, Server 2008 R2, Windows 8.1, Server 2012 R2
【错误信息】
When attempting to import arcpy using 64-bit Python that comes with an ArcGIS Server installation, the following error message appears:
"ImportError: No module named arcpy"
【错误原因】
The arcpy module's location probably isn't specified correctly within the Server10.x.pth file. This file is in the following location:
Article ID: 45618
Software:
ArcGIS for Server 10.1, 10.2.1, 10.2.2, 10.3, 10.3.1, 10.2
Platforms:
Windows Windows 7, Windows 8, Server 2012, Server 2008 R2, Windows 8.1, Server 2012 R2
【错误信息】
When attempting to import arcpy using 64-bit Python that comes with an ArcGIS Server installation, the following error message appears:
"ImportError: No module named arcpy"
【错误原因】
The arcpy module's location probably isn't specified correctly within the Server10.x.pth file. This file is in the following location:
<install-drive>\python27\Lib\site-packages
2 个回复
EsriSupport
赞同来自:
1. Ensure that the following locations are specified in the Server10.3.pth file (the version of ArcGIS Server determines the name of the .pth file):
The ArcGIS Server Installer also utilizes the sys.path functions and adds the following location to the system path:
2. From the main toolbar in ArcMap, open the Python window and run the following commands:
3. Verify that arcpy is in the system path.
Python checks both 'sys.path' and the 'Server10.3.pth' file for a module named 'arcpy' when importing arcpy. As long as the location of arcpy is specified, importing arcpy will be successful:
【创建及修改时间】
Created: 10/8/2015 Last Modified: 11/13/2015
【原文链接】
http://support.esri.com/en/kno ... 45618
Aaronbi
赞同来自:
要回复问题请先登录或注册
发起人
相关问题
问题状态
—— 扫技术支持中心微信服务号!
—— 让GIS知乎问答随时随地!