操作步骤
- 确定好ArcMap安装位置所对应的Python文件的位置
- D:\ ArcGIS 10.8
- D:\Python27\ArcGIS10.8\ python.exe
- 调整python解释器
- 打开使用的PyCharm项目
- 选定页面最右下角的python解释器【Python Interpreter】
- 【lnterpreter Settings…】->【Python Interpreter】->【Add lnterpreter】->【Add Local lnterpreter…】
- 【Environment: 🔘 Existing】
- 【lnterpreter: …】
- 点击【…】->选定【D:\Python27\ArcGIS10.8\python.exe】
- 【lnterpreter Settings…】->【Python Interpreter】->【Add lnterpreter】->【Add Local lnterpreter…】
- 完成后即可import arcpy