Create a Python project
Ensure that the Python plugin is installed and enabled.
From the main menu, choose Welcome screen, click New Project.
or on theIn the New Project dialog, select Python as a project type.
If you have any configured Python environments, select one from the list, or click and specify a path to the target environment.
If no environment is available, select the New button and choose the environment type:
Specify the location of the new virtual environment in the text field, or click and specify it in your file system. Note that the directory where the new virtual environment should be located, must be empty!
Choose the base interpreter from the list, or click and find a Python executable in the your file system.
If IntelliJ IDEA 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).
Select the Inherit global site-packages checkbox if you want that 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-packages
option of the virtualenv tool.Select the Make available to all projects checkbox if you want to reuse this environment when creating Python interpreters in IntelliJ IDEA.
Ensure that Anaconda or Miniconda is downloaded and installed on your computer, and you're aware of a path to its executable file.
Refer to the installation instructions for more details.
Specify the location of the new Conda environment in the text field, or click and specify it in your file system. Note that the directory where the new Conda environment should be located, must be empty!
Select the Python version from the list.
Specify the location of the Conda executable file in the text field, or click and find location in the Conda installation directory. You're basically looking for a path that you've used when installing Conda on your machine.
Select the Make available to all projects checkbox if you want to reuse this environment when creating Python interpreters in IntelliJ IDEA.
Ensure that you have installed Pipenv on your machine.
Choose the base interpreter from the list, or click and find a Python executable in the your file system.
If you have added the user base’s binary directory to your
PATH
environmental variable, you don't need to set any additional options: the path to the pipenv executable will be autodetected.If you have not modified the
PATH
variable, IntelliJ IDEA shows an error message: Pipenv executable is not found. Discover the proper executable path as described in the pipenv installation procedure and enter the target string in the Pipenv executable field, for example: C:\Users\jetbrains\AppData\Roaming\Python\Python37\Scripts\pipenv.exe (Windows) or /Users/jetbrains/.local/bin/pipenv (macOS).
Ensure that you have installed Poetry.
Select the base Python interpreter from the list, or click and find its location in your file system.
If IntelliJ IDEA has not discovered the Poetry path, click near Poetry executable and navigate to its location. Then click OK in the explorer window to add it to the field.
Click Create to complete the task.