PyCharm 2020.3 Help

Importing Project from Existing Source Code

You can set up a project around the existing source code created externally, in other words, in another IDE or in a dedicated editor. PyCharm analyzes the code base and adds the .idea directory with settings.

Creating projects from existing source code

  1. From the main menu, choose File | Open.

  2. In the dialog that opens, select the directory that contains the desired source code. Note that applications created externally are marked with the regular directory icon a directory icon.

  3. Click OK.

  4. Specify whether you want the new project to be opened in a separate window or close the current project and reuse the existing one. See the section for details.

PyCharm will be searching for a virtual environment in the source directory.
If no environment is detected, PyCharm will set up the system interpreter for the project:

Create a project from existing sources

You can click the Configure a Python Interpreter link and select Interpreter Settings to configure a Python interpreter and install packages, if needed.

With this done, you are all set to start working on your project in PyCharm: double-click your files in the Project tool window to edit them.

Refer to Opening a project from Git for more details on how to create a project from a version control system.

Last modified: 11 March 2021