Creating a Python Project
MindStudio IDE allows you to create, develop, and debug Python projects, and perform remote debugging.
Python Project Creation Method
- Navigate to the project creation window.
- On the MindStudio IDE welcome page, choose Projects from the left menu and click New Project on the right.
Figure 1 Project creation page
- On the MindStudio IDE project page, click
in the upper left corner of the project page. On the menu bar, choose
- On the MindStudio IDE welcome page, choose Projects from the left menu and click New Project on the right.
- In the New Project window, select New Project from the left menu and set project parameters, as described in Table 1.
Table 1 Project parameters Parameter
Description
Name
Project name (user-defined).
Location
Default path for saving a project (user-defined). (For users who use MindStudio IDE for the first time, the default value is $HOME/MindstudioProjects)
Create Git repository: indicates whether to create a Git repository. A repository can be created only after this option is selected.
Language
Select Java or Python, or click + on the right to select another language to create a project.
Select Python when creating a Python project.
Environment
Configure a Python environment. The options are New and Existing.
- Select New to add an environment configuration.
- Select Existing to specify an existing interpreter.
Environment type
Select an environment type. The options are as follows:
- Virtualenv
- Conda
- Pipenv
- Poetry
Location
Configure the location of the Virtualenv or Conda environment. You can click the folder icon on the right to select a desired location.
This parameter is available when Environment type is set to Virtualenv or Conda.
Base interpreter
You can select a basic interpreter from the drop-down list or click ... on the right to specify an interpreter in another directory.
This parameter is available when Environment type is set to Virtualenv, Pipenv, or Poetry.
Inherit global site-packages
If this option is selected, all software packages installed in the global Python on the computer will be added to the virtual environment to be created.
This parameter is available when Environment type is set to Virtualenv.
Make available to all projects
If this option is selected, MindStudio IDE will reuse this environment when creating a Python interpreter.
This parameter is available when Environment type is set to Virtualenv or Conda.
Python version
Select a Python version from the drop-down list.
This parameter is available when Environment type is set to Conda.
Conda executable
It indicates the location of the Conda executable file. The system automatically checks the path of the Conda executable file. You can click the folder icon on the right to select the path.
This parameter is available when Environment type is set to Conda.
Pipenv executable
It indicates the location of the Pipenv executable file. The system automatically checks the path of the Pipenv executable file. You can click the folder icon on the right to select the path.
This parameter is available when Environment type is set to Pipenv.
Poetry executable
It indicates the location of the Poetry executable file. The system automatically checks the path of the Poetry executable file. You can click the folder icon on the right to select the path.
This parameter is available when Environment type is set to Poetry.
- Click Create. A project is created.
If there is already an active project in the window, a confirmation message is displayed.
- Click This Window to open the newly created project in the current window.
- Click New Window to open the newly created project in a new window.
- After the project is created, find the project directory displayed in a tree structure.
Importing a Python Project
- Import the project file.
- On the MindStudio IDE welcome page, click Open, select the project to be imported, and click OK.
- In the upper left corner of the MindStudio IDE project page, click the
menu bar, choose from the top menu bar or click
on the toolbar, and select an existing project to open it.
If a project has code risks, the trust window is displayed when you open the project.
- If the project source code is trusted and secure, click Trust Project. (You can select Trust projects in <workspace_directory> to trust all projects in the directory.)
- If the project is not trusted and you only want to view the source code, click Preview in Safe Mode to preview the project in safe mode.
- To cancel opening the project, click Don't Open.
- If there is already an active project in the window, a confirmation message is displayed.
- Click This Window to open the project in the current window.
- Click New Window to open the project in a new window.
- After the project is imported, find the project directory displayed in a tree structure.