PyCharm 2021.1 Help

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.

  1. To create a project, do one of the following:

    • From the main menu, choose File | New Project

    • On the Welcome screen, click New Project

    New Project dialog opens.

  2. In the New Project dialog, specify the project name and its location. The dialog may differ depending on the PyCharm edition.

    Creating a new project

    Creating a PyCharm helps implement new project

  3. Next, click Expand the node to expand the Python Interpreter node, and select the new environment or existing interpreter, by clicking the corresponding radio-button.

    The following steps depend on your choice:

    • New environment using: if this option has been selected, choose the tool to be used to create a virtual environment. To do that, click the list and choose Virtualenv, Pipenv, or Conda.

      Next, specify the Location and Base interpreter of the new virtual environment. If necessary, click the Inherit global site-packages and Make available to all projects check boxes.

      When configuring the base interpreter, you need to specify the path to the Python executable. If PyCharm detects no Python on your machine, it provides two options: to download the latest Python versions from python.org or to specify a path to the Python executable (in case of non-standard installation).

      Downloading Python when creating a new project
    • 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 Open 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.py file to your project. This file contains a very simple Python code sample and can be a starting point of your project.

      Welcome script in the Python project

Once you created a project, you can proceed with configuring the project structure.

Last modified: 08 March 2021