【ArcGIS Pro】【ArcPy】如何在VS Code中配置ArcGIS Pro 的Python开发环境?How to configure Visual Studio Code with ArcGIS Pro’s Python Environment
源:[1052] Add the ArcPy Python interpreter in VS Code - McDelfino - 博客园
How to configure Visual Studio Code with ArcGIS Pro’s Python Environment
To add the ArcPy Python interpreter in Visual Studio Code (VS Code), follow these steps:
-
Install ArcGIS Pro: Ensure you have ArcGIS Pro installed, as it includes the ArcPy library.
-
Install VS Code: Download and install Visual Studio Code from the official website.
-
Install the Python Extension: Open VS Code, click on the Extensions icon on the left sidebar, search for “Python,” and install the extension provided by Microsoft.
-
Open Command Palette: Press
Ctrl+Shift+P
(orCmd+Shift+P
on macOS) to open the Command Palette. -
Select Interpreter: Type
Python: Select Interpreter
in the Command Palette and select it. -
Enter Interpreter Path: Choose
Enter interpreter path
and navigate to the ArcGIS Pro Python interpreter. The default path is usually:C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe