Python SDK Settings
Setting the Global Python SDK
- On the project page, choose . The Project Structure... dialog box is displayed.
- In the navigation bar on the left, choose . In the configuration window on the right, click + and choose to access the window for adding a Python interpreter.Figure 1 Adding the global Python library

- In the Add Python Interpreter window, select a proper Python interpreter based on the actual requirements. Table 1 lists the optional interpreters. Click OK.Figure 2 Adding a Python interpreter
Table 1 Python interpreter options Interpreter
Description
Virtualenv Environment
Integrates the Virtual Environment tool to create an independent virtual environment.
Conda Environment
Uses the Python interpreter contained in Anaconda.
System Interpreter
Specifies the local interpreter in the system.
Pipenv Environment
Pipenv is a tool that provides all the necessary methods to create a virtual environment for Python projects.
Poetry Environment
Uses the Poetry tool to create a virtual environment based on project dependencies.
- Import other third-party Python libraries or custom Python libraries based on your actual requirements. Click OK to close the Project Structure window.Figure 3 Viewing the Python libraries

Setting the Project-Level Python SDK
- On the project page, choose . The Project Structure dialog box is displayed.
- In the navigation bar on the left, choose . The Project settings page is displayed.In the SDK area, select a configured Python SDK from the drop-down list or select to access the Python interpreter adding window. Then add a Python SDK and click Apply, as shown in Figure 4.
Setting the Module-Level Python SDK (Ascend Project)
- On the project page, choose . The Project Structure dialog box is displayed.
- In the navigation bar on the left, choose . The Modules setting page is displayed.On the right of the new Python item, select a configured Python SDK from the drop-down list or click
to customize a Python SDK, and click Apply, as shown in Figure 5.
Figure 6 Selecting an existing Python SDK or customizing a Python SDK
Setting the Module-Level Python SDK (Non-Ascend Project)
- On the project page, choose . The Project Structure dialog box is displayed.
- In the navigation tree on the left, choose . The Modules setting page is displayed.On the Dependencies tab page, select a configured Python SDK from the drop-down list or select to access the Python interpreter adding window. Then add a Python SDK and click Apply, as shown in Figure 7.
Parent topic: Basic Operations


