Create a Python project
Pure Python projects are intended for Python programming. A project helps you organize your source code, tests, libraries that you use, and your personal settings in a single unit. In case, you don't need a project, you can edit your file in the LightEdit mode.
To create a project, do one of the following:
From the main menu, choose
On the Welcome screen, click New Project
New Project dialog opens.
In the New Project dialog, specify the project name and its location. The dialog may differ depending on the PyCharm edition.
Next, choose whether you want to create a new environment or use an existing interpreter, by clicking the corresponding radio-button.
To use a remote Python interpreter, select Previously configured interpreter.
The following steps depend on your choice:
- New environment
Next, specify the Location and Base interpreter of the new virtual environment.
Select the Inherit global site-packages checkbox if you want all packages installed in the global Python on your machine to be added to the virtual environment you're going to create. This checkbox corresponds to the
--system-site-packagesoption of the virtualenv tool.
Select the Make available to all projects checkbox if you want to reuse this environment when creating Python interpreters in PyCharm.
If PyCharm detects no Python on your machine, it provides the following options:
Specify a path to the Python executable (in case of non-standard installation)
Download and install the latest Python versions from python.org
Install Python using the Command-Line Developer Tools (macOS only).
- Previously configured interpreter
If this option has been selected, choose the desired interpreter from the list, or (if the desired interpreter is not found), click Add Interpreter and choose the interpreter.
See Configure a Python interpreter for details.
Create a main.py welcome script: keep this option selected if you want PyCharm to add the
main.pyfile to your project. This file contains a very simple Python code sample and can be a starting point of your project.
Once you created a project, you can proceed with configuring the project structure.
See more details on creating projects in PyCharm in the video tutorial: