PyCharm

How to Create a New Project in PyCharm

How to Create a New Project in PyCharm

File | New Project does it, or the New Project button on the Welcome screen. Set a location, choose an interpreter, click Create. That one pass gives you the project folder, a Project venv environment and the .idea settings folder.

PyCharm 2026.2 only asks for a location, and the project name comes from the last folder in that path. A tutorial showing a separate name field is describing an older dialog (JetBrains PyCharm Help, 2026).

The free core handles pure Python projects. Django, Flask and FastAPI project types need a Pro subscription or trial.

How to Create a New PyCharm Project

YouTube player

Python has to be on the machine first, since PyCharm builds the project environment from an existing installation. The dialog can download one for you, but only on Windows and macOS.

In PyCharm, a project is one unit that holds source code, tests, libraries and personal settings (PyCharm 2026.2 Help).

  1. On the Welcome screen, click New Project (the quick start guide labels the button New…). With a project already open, go to File | New Project.
  2. Enter the project location. PyCharm takes the project name from the last folder in that path.
  3. Pick an interpreter: Project venv, uv or Base conda, or Custom environment for anything else.
  4. Tick or clear Create Git repository and Create a main.py welcome script.
  5. Click Create. If another project is open, PyCharm asks whether to use a new window or the current one.

The 2026.2 dialog asks for a location only, which is why name fields show up in older screenshots. The 2024.1 Help describes separate name and location fields, so anything written against that version won’t match what you see now.

Which Project Type Should You Pick in PyCharm and PyCharm Pro?

Go with Pure Python unless you want PyCharm to generate a web framework skeleton. Django, Flask and FastAPI types need Pro, which means a subscription or the 30-day trial that comes with every install.

The edition situation is messier than it looks. JetBrains Help dates the merge of Community and Professional into one PyCharm to 2025.1, yet Community 2025.2 stayed supported as the last standalone build and the migration path opened with 2025.3.

Core features, Jupyter Notebook support included, stay free. Without Pro, the dialog creates Python projects only (PyCharm 2026.2 quick start guide).

A feature-by-feature comparison of the Community and Professional editions lists what else a subscription adds beyond project types.

Why is Python conquering the tech world?

Explore comprehensive Python statistics: market dominance, developer preferences, salary insights, and growth trends across industries.

Discover Python Insights →

Pure Python gives you an empty project with no framework files. It works in the free core and suits scripts, libraries and learning. The framework types are for projects where the scaffold is the point, and they come with generated structure.

Django builds the directory structure and settings, asks for an application name (which must not match the project name) and offers to download Django if the interpreter lacks it. FastAPI installs fastapi and uvicorn, then adds a run/debug configuration. Flask builds the directory structure and downloads Flask when it’s missing.

A pure Python project still runs a Flask or FastAPI app once you install the packages yourself. You skip the scaffold and the framework-aware tooling, and the free core costs nothing.

Which Interpreter Type Fits a New PyCharm Project?

Project venv is the sensible pick unless the project already uses another tool. It needs only a Python installation and puts the environment in a .venv folder at the project root.

Up front, PyCharm shows Project venv, uv and Base conda. Pipenv, Poetry, Hatch, Virtualenv and named Conda environments sit under Custom environment (PyCharm 2026.2 Help).

New to Python or just need a quick reference? List comprehensions, built-in functions, and core syntax - including lambda, dict methods, and file I/O - is on one page in the Python Cheat Sheet.

That list changed recently. In the 2025.2 Help, uv appears only under Custom environment, while the 2025.3 Help adds a top-level uv option beside Project venv and Base conda.

OptionWhat PyCharm sets upPick it when
Project venvVirtualenv in .venv at the project rootNothing else dictates the tool
uvuv environment, .venv at the root by defaultThe team already works with uv
Base condaConda base environment as the interpreterQuick conda work, no isolation needed
PoetryPoetry environment, optional in-project folderDependencies are managed with Poetry
PipenvPipenv environmentThe team already uses Pipenv

Hatch lives in the Custom list as well. Select a Hatch environment, or Hatch falls back to its default one when you pick none.

Base conda is the odd one out because it has no isolation at all. Every project pointed at it shares the base environment’s packages. For a project-specific conda environment, choose Custom environment, then Conda, and name the environment.

Most developers still reach for venv. Against venv’s 62%, conda sits at 19%, Poetry at 18% and uv at 11% in its first year on the list (Python Developers Survey 2024, Python Software Foundation and JetBrains, 2025).

A side-by-side look at venv, conda and Poetry covers the trade-offs in more depth than a dialog choice needs.

How to Choose the Base Interpreter

Whatever Python installation you pick here is what PyCharm builds the new environment from.

With Project venv and uv, you choose the version in the Python version field. Virtualenv, Pipenv, Poetry and Hatch give you a list instead, or you can browse to the Python executable yourself. If no Python turns up, the dialog offers a download on Windows and macOS only, so on Linux install Python first.

PyCharm 2026.2 supports Python 3.9 through 3.15, plus legacy 2.7, according to its quick start guide. Check that range before choosing an older system Python.

How to Reuse an Existing Interpreter

Custom environment covers the case where another project already has the setup you want. Set Type to Python and select the executable, or set it to Conda and pick a named environment.

  • With the Python type, select the executable from the list or browse for it
  • With Conda, name the environment, then select it from the list
  • If you gave PyCharm the conda path by hand, reload the environments

Two checkboxes on the Virtualenv form change how the environment gets reused. Make available to all projects offers it when you create interpreters elsewhere, and Inherit packages from base interpreter copies the global Python’s packages in, the same as virtualenv’s –system-site-packages flag.

Leave the inherit box off. It lets global packages leak in and defeats the point of a per-project environment.

Already created the project? You can still add a Python interpreter in PyCharm afterwards from the interpreter settings.

What Do the Initial Project Options Create?

Every new project folder gets an .idea settings folder. The dialog choices add a .venv environment folder, a main.py starter file and a Git repository on top.

Inside .idea you’ll find the XML project settings, plus a workspace.xml with your personal preferences. The .venv folder is the environment for Project venv and the uv default. main.py holds a short code sample from the welcome script option, and .git is the repository that Create Git repository sets up.

Ticking Create Git repository has PyCharm initialize the repository for you, the job git init performs. Leave the box clear when the folder already sits inside another repository, because a second one would nest inside the first.

With version control on, PyCharm moves workspace.xml to the .gitignore list by itself, so personal settings stay out of commits (PyCharm 2026.2 Help). The remaining .idea files are yours to commit, and the Always Add option schedules them for you.

The interpreter is the one thing .idea does not hold. PyCharm stores Python interpreters in the IDE’s per-installation configuration directory, so they do not travel through version control or Settings Sync (PyCharm 2026.2 Help).

Only the interpreter name is portable. The file .idea/misc.xml records it as project-jdk-name, so a teammate who registers an interpreter under the same name matches the project. The exception is uv-managed interpreters: on fresh registration, uv generates its own display name and overwrites the committed one.

Keep the welcome script for scratch work and learning. Clear it when you plan your own package layout, or main.py becomes a file you delete by hand.

How to Check That the New PyCharm Project Runs

Run main.py, read the active interpreter on the status bar, then open the Python Packages tool window. If the script executes and the package list loads, the environment is wired correctly.

To run the file, right-click in the editor and choose Run ‘main’, or press Ctrl+Shift+F10. The Python Interpreter selector on the status bar shows the active environment and switches it quickly. View | Tool Windows | Python Packages lists what the environment holds.

The first run creates a temporary run/debug configuration for the file, and saving it makes it permanent (PyCharm 2026.2 Help). More launch options are covered in a separate guide to running code in PyCharm.

The Python Packages tool window shows installed packages plus those available from PyPI and conda repositories. Type a name in the search field, pick a version if you need one, and click Install.

Pip does the work by default, and conda environments can switch to the conda package manager. Packages land in the selected interpreter’s environment, so each project keeps its own set.

Right-click next to a package name and choose Install with Options when you need pip flags.

A quick smoke test beats guessing.

  1. Install requests from the Python Packages tool window.
  2. Add import requests at the top of main.py.
  3. Run again and watch the Run tool window for an import error.

Moving packages over from an older project works through requirements.txt. Run pip freeze > requirements.txt in that project’s Terminal, add the file to the new one, and PyCharm prompts you to install what it lists.

For more detail, see this guide to installing packages in PyCharm.

Why Does Creating a PyCharm Project Fail?

Most failures come down to a non-empty environment folder, no Python on the machine, an undetected tool executable, an invalid interpreter path or a missing Git executable. Each one has a fix inside the dialog.

ConditionCauseFix
Environment location has filesThe Help requires an empty directoryChoose an empty folder or a new subfolder
No Python foundDialog has no base interpreter to offerGive the executable path, or download Python (Windows, macOS)
Tool not detectedPoetry, Pipenv, uv, conda or Hatch not foundPoetry and Pipenv: Install via pip. The rest: enter the executable path
Invalid environment warningPython binary missing, or version unsupportedCheck the path, install a supported version
No Git executableGit is not on the machineAccept the download PyCharm suggests

On macOS the dialog adds a second route for a missing Python: installing it through the Command-Line Developer Tools (PyCharm 2026.2 Help).

When the dialog keeps rejecting an environment, create the virtual environment in PyCharm on its own through Add New Interpreter, then select it as an existing interpreter. The Invalid environment warning also appears there, with the same two causes.

The sources don’t fully agree on Python versions. PyCharm 2026.2 still lists Python 3.9 and 3.10 as supported, while the Python Developer’s Guide, updated May 2026, sets end of life at 2025-10-31 for 3.9 and 2026-10-01 for 3.10.

The dialog builds an environment on either version, so the choice is yours. Pick 3.11 or newer, which still gets security fixes, and 3.14 if every dependency ships wheels for it.

A wrong pick costs little, because you can change the Python version in PyCharm after the project exists.

When Should You Open Existing Code Instead of Creating a New Project?

Create a new project for code that does not exist yet. Open the folder instead when the code does.

A new project fits an empty folder where you want PyCharm to build the environment. Opening fits code written in another IDE or a dedicated editor, or any folder that already has a virtual environment sitting in the source directory.

Go to File | Open, or click Open on the Welcome screen, and select the directory that holds the sources. PyCharm adds an .idea directory, then searches the folder for a virtual environment and offers to use it or configure a new interpreter (PyCharm 2026.2 Help).

If it finds none, PyCharm falls back to the system interpreter, which has no per-project isolation. Click Configure a Python Interpreter and choose Interpreter Settings to fix that.

Code that lives in a remote repository takes another path: clone it. On the Welcome screen, click Clone (the quick start guide still labels it Get from VCS) and choose Git, Mercurial, Subversion or Perforce (Perforce needs Pro), or use File | New | Project from Version Control inside an open project.

The Git side of that step is covered in a guide to cloning a Git repository.

Click Yes when PyCharm offers to create a project from the cloned sources, and it maps the Git root to the project root. A trust dialog then asks you to pick Trust Project or Preview in Safe Mode.

Some work needs no project at all. The Script button on the Welcome screen adds a Python file to an automatically created PyCharmMiscProject, ready to run. LightEdit does single-file editing in a text-like editor with no code completion or navigation, and you start it with the -e option.

From LightEdit, Access full IDE on the status bar and Open the Current File in Project take you to a full project.

New folder, new project. Existing folder, Open.

New PyCharm Project FAQ

What is a PyCharm project?

The IDE treats the folder as one unit holding source code, tests, libraries and personal settings. Code completion, refactoring and style checks all run in the context of that project (PyCharm 2026.2 Help).

How do I switch the interpreter after the project exists?

Click the Python Interpreter selector on the status bar and pick another interpreter. Settings | Python | Interpreter does the same, and Show All lists every interpreter PyCharm knows, including ones you can rename or remove.

Should the .idea folder go into Git?

Mostly yes. The XML files under .idea hold shared settings such as code style, while workspace.xml and usage.statistics.xml stay out of version control (PyCharm 2026.2 Help).

Share .idea/runConfigurations only if every teammate registers their interpreter under the same name.

How do I create a Django project in PyCharm?

Django projects need Pro. Go to File | New Project, select Django as the project type, set the location and interpreter, and type an application name that differs from the project name.

Click Create. PyCharm downloads Django into the interpreter if it is missing.

Can two projects share one Python installation?

Yes. PyCharm builds several interpreters from the same Python executable, so each project gets its own virtual environment on the same base version.

The Help’s own example: one Python 3.12 environment for Django applications, another for scientific libraries.

Can I set a default interpreter for new projects?

Yes. Open File | New Projects Setup | Settings for New Projects, choose Python Interpreter settings, then select or add an interpreter.

PyCharm applies it to projects that have no .idea folder when you first open them.

How to Make a New PyCharm Project Reproducible

A new PyCharm project rebuilds on another machine from the source files, a dependency file such as requirements.txt, and the shared .idea settings, all committed.

Freeze the dependencies into requirements.txt and add .venv to the ignore list. Sources and the shared .idea files get committed.

The dependency file comes first because a teammate rebuilds the environment from it, not from your .venv.

Pin a Python version that outlasts the project. Of the versions PyCharm 2026.2 lists, only 3.11 through 3.14 sit inside the Python Developer’s Guide support window (May 2026 update), and 3.11 retires in a scheduled October 2027.

Pinning exact versions buys identical rebuilds and costs a manual refresh whenever a dependency ships a fix.

Once the first commit exists, connect the project to GitHub to share it.

Bogdan Sandu

Stay sharp. Ship better code.

Every week: one curated article, one tool worth knowing, one tip you can use tomorrow. No noise, no padding.