Configuring and Running the Project

  1. Configure the Python interpreter.
    1. Choose File > Project Structure from the menu bar of MindStudio, as shown in Figure 1. Click the SDK drop-down list box, and select Add Python SDK....
      Figure 1 Configuring the Python interpreter
    2. Click the SDK drop-down list, and select and configure the Python interpreter based on your actual requirements, as shown in Figure 2. Click OK.
      Figure 2 Interpreter configuration example
  2. On the menu bar of MindStudio, choose Run > Edit Configurations....
    In the Run/Debug Configurations window, click at the upper-left corner to create a run configuration item Python, as shown in Figure 3. After setting the parameters, click OK.
    • Script path: Select image.py in the project directory.
    • Parameters: Enter the full name of the test image file.
    • Python interpreter: Select Use specified interpreter and select the added Python interpreter from the drop-down list box.
    Figure 3 Run configuration
  3. On the menu bar of MindStudio, choose Run > Run'<Project name>' to run the project.
    If the following information is displayed, the execution is complete. You can view the execution result in my_result.jpg in the project directory. See Figure 4.
    Process finished with exit code 0
    Figure 4 Viewing the running result