How to create a new project in PyCharm: Create a new project: File menu> New> Project...Configure project settings: Select the project location, name, Python interpreter, click "Create" to add source code : Create a new file in the "src" folder, add Python source code Runner: Right-click on the project root directory > Run 'python'
##How to create a new project in PyCharm
The method of creating a new project in PyCharm is as follows:
Step 1: Create a new project
Open PyCharm and click the "File" menu. - Select "New" > "Project..."
-
Step 2: Configure project settings
In " In the Create New Project dialog box, select a project location. - Enter a name for your project.
- In the Interpreter field, select the Python interpreter you want to use.
- Click the "Create" button.
-
Step 3: Add source code
After creating the project, you will see a project structure containing a "src" folder. - Create a new file containing the Python source code in the "src" folder.
-
Step 4: Run the program
#To run your program, right-click on the root of the project and select "Run 'python' ". - You can also use the shortcut keys provided by PyCharm Ctrl Shift F10 on Windows or Cmd Shift R on macOS to run the program.
-
Tip:
You can add other The directory is specified as the source code directory. - You can configure PyCharm to use a virtual environment or a remote interpreter in the Settings dialog.
- PyCharm also provides a series of templates to help you quickly create common project types.
-
The above is the detailed content of How to create a new project in pycharm. For more information, please follow other related articles on the PHP Chinese website!