PyCharm

How to Use PyCharm: Tips for Beginners

How to Use PyCharm: Tips for Beginners

Community and Professional merged into a single PyCharm in version 2025.1, and the free core now includes Jupyter Notebook support (JetBrains documentation, 2026). Anything written before that still describes two editions, so older tutorials rarely match what you see after a fresh install.

PyCharm is JetBrains’ dedicated Python IDE. People use it for scripts, web applications and data science work.

Is PyCharm Free, and Which Version Should You Install?

Mostly, yes. The core features cost nothing, Jupyter Notebook support included, and a Pro subscription adds the advanced tooling on top.

Since 2025.1 there is only one download. JetBrains documentation calls PyCharm Community 2025.2 the last supported Community version, and 2025.3 added the migration path for people coming from it. Every fresh install starts a 30-day Pro trial on its own (PyCharm 2026.2 documentation).

When the trial runs out, you buy Pro or stay on the free core. Existing Professional license holders keep every Pro feature and nothing changes for them.

Most tutorials online still describe the old split between Community and Professional, so their screenshots and menu names don’t line up with a new install.

AreaFree corePro subscription
Python projects, code assistance, run and debugIncludedIncluded
Jupyter notebooksIncludedIncluded
Web framework project templatesNot includedIncluded
Remote run, debug and testNot includedIncluded
Database toolsNot includedIncluded

Start with the free core. It covers scripts and notebook work, and it’s plenty for learning Python.

Switch to the Pro trial once a project needs a Django or Flask template or a remote interpreter. A database connection is the other trigger. Pricing differs by plan, so check the JetBrains store before committing.

How to Install PyCharm

Install it through the JetBrains Toolbox App. JetBrains recommends it over a standalone download because it handles updates and rollbacks too, and it keeps several versions side by side.

  1. Download the Toolbox App installer for your operating system from the Toolbox App page.
  2. Run it. On Windows that is an .exe wizard, on macOS you drag the app from the mounted .dmg into Applications, and on Linux you unpack the tar.gz and run ./bin/jetbrains-toolbox.
  3. Sign in to your JetBrains Account so Toolbox can activate any license you already hold.
  4. Pick PyCharm from the product list and install it. Choose Available versions if you need a specific build.

The standalone Windows installer adds wizard options such as putting the launchers directory on PATH and an Open Folder as Project context-menu entry. A step-by-step Windows installation guide walks through those screens.

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 →

macOS ships as two separate disk images, one for Intel and one for Apple Silicon.

On Linux, the tar.gz archive goes into /opt by filesystem convention, and you start the IDE with ./pycharm from the bin folder. Distribution-specific details are in a guide on installing PyCharm on Linux.

Snap works too (sudo snap install pycharm --classic). The installation guide warns about possible performance degradation and slow file operations with snap builds, and suggests Toolbox instead.

Supported systems per the 2026.2 installation guide: Windows 10 and 11, macOS 15 and 26, and Linux on Ubuntu 24.04 and 26.04 LTS, Fedora 43 and 44, Debian 13 or Amazon Linux 2023. BSD-based systems are not supported.

The PyCharm 2026.2 documentation sets the minimum at 8 GB of RAM total, with 3 GB of it available for the IDE processes, and 10 GB of disk space on a 4-core x86\_64 or arm64 CPU. Python 3.9 up to 3.15 is supported, and 2.7 is also listed. Java isn’t required because JetBrains Runtime (JBR 21) comes bundled.

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.

Tutorials that quote 2 GB of free RAM and 3.5 GB of disk space (5 GB recommended on an SSD) are repeating the older 2025.3 requirements table.

How to Create Your First Project in PyCharm

YouTube player

Open File, then New Project, choose a folder, pick an environment and click Create. Everything in PyCharm happens inside a project, since refactoring and settings attach to it, and code assistance does too.

  1. Go to File, then New Project, or click New Project on the Welcome screen.
  2. Set the project location. The project name comes from the last folder in that path.
  3. Tick Create Git repository if the project should start under version control.
  4. Tick Create a main.py welcome script for a starter file.
  5. Choose Project venv, uv or Base conda, select the Python version and click Create.

A longer walkthrough of creating a new project in PyCharm shows each field of that dialog.

The environment lands in a .venv folder in the project root by default. Downloading a missing Python version from the dialog works only on Windows and macOS (JetBrains documentation, 2026).

Free PyCharm creates plain Python projects. Web framework templates need Pro.

You don’t have to start from the dialog at all. Open a folder of existing sources and PyCharm builds a project around it, or clone a Git repository straight from the Welcome screen. The Script button on the same screen skips the project step and drops a file into an automatic PyCharmMiscProject.

To add code, right-click the project root in the Project tool window and choose File, New, Python File.

How to Set Up a Python Interpreter and Virtual Environment

PyCharm needs at least one Python interpreter before it can run or analyze your code. New projects get an isolated virtual environment, and the Python Interpreter selector in the status bar switches or adds others later.

The 2026.2 interpreter documentation lists virtualenv, pipenv, Poetry, uv, Hatch and conda as environment types. Four of those cover most projects.

ToolFitsCatch
venvPlain projects that rely on pipNo lockfile by default
uvFast environment and package handling; the suggested default manager in the New Project wizard since PyCharm 2025.3, when uv is detected on your systemPyCharm detects uv automatically; if it cannot, set Path to uv
condaData science stacks with non-Python dependenciesBase conda points at your shared base environment
PoetryProjects managed through pyproject.tomlPoetry must be installed, or PyCharm installs it via pip

PyCharm 2025.3, released in December 2025, made uv the suggested default environment manager for new projects whenever uv is found on your system, and PyCharm keeps using a different manager if you picked one earlier. Unless the project depends on conda packages, uv or a plain venv is enough.

The trade-offs go deeper in a comparison of venv versus conda versus Poetry.

Adding or switching a local interpreter

Press Ctrl+Alt+S and open Python, then Interpreter. You can also click the interpreter selector and choose Interpreter Settings.

If the interpreter you need isn’t in the list, browse for the executable. On macOS that is venv/bin/python, and on Windows it is venv\Scripts\python.exe. When PyCharm can’t detect pipenv or Poetry, the dialog can install them via pip.

Installing packages into the project environment

The Python Packages tool window previews what the interpreter already has and adds new packages to it. A separate guide shows how to install packages in PyCharm click by click.

One catch. A pip install run in an external terminal lands in whichever Python that shell uses, which may not be the project interpreter.

After changing an interpreter outside the IDE, press Shift twice, type Rescan and pick Rescan Available Python Modules and Packages (JetBrains documentation, 2026).

How to Write and Search Code Faster in PyCharm

YouTube player

Press Alt+Enter on any flagged line to see fixes, and press Shift twice to search the whole IDE. The shortcuts below are the default keymap on Windows and Linux.

ActionShortcutWhat it does
Show fixes and intention actionsAlt+EnterApplies a quick-fix or intention at the caret
Generate codeAlt+InsertCreates constructors, overrides and other symbols
RenameShift+F6Renames a symbol and its references
Search EverywhereShift, ShiftFinds files, classes, symbols and actions
Go to declarationCtrl+BJumps to where a symbol is defined
Find usagesAlt+F7Lists every place a symbol is used

macOS defaults differ. The full default map opens from Help, Keyboard Shortcuts PDF, and a longer list of PyCharm keyboard shortcuts covers more combinations.

Code assistance and refactoring

Completion runs as you type, and smart type-matching completion reads the surrounding context to narrow the suggestions. Inspections run constantly. The indicator at the top right of the editor shows the status of the whole file.

Quick-fixes repair code that may be wrong, such as unused code, while intention actions change code that is already correct, like adding constructor parameters. Live templates insert with Ctrl+J, and Ctrl+Alt+T wraps a selection in one.

Refactoring opens with Ctrl+Alt+Shift+T, and Extract Method sits on Ctrl+Alt+M. PyCharm previews many changes first, which makes it safe to restructure code without changing its behavior.

If a result looks wrong, Ctrl+Z undoes it. Formatting rules live under Settings, Editor, Code Style, per language, and you can save your own scheme.

Searching and jumping through a project

Search Everywhere is the widest net, and these narrower tools are quicker when you know what you want.

  • Ctrl+E opens Recent Files
  • Ctrl+Shift+A runs Find Action, so a partial action name is enough
  • Ctrl+F searches the current file, Ctrl+Shift+F the whole project
  • Ctrl+Alt+Left and Ctrl+Alt+Right move back and forward through your edit history
  • Ctrl+U goes to the base class or function

Gutter icons next to a class or method also jump to subclasses and declarations.

How to Run a Python Script and Set Up a Run Configuration

Right-click the file and choose Run, or press Ctrl+Shift+F10 on Windows and Linux. If the script has a \_\main\\_ block, the Run icon in the gutter does the same job.

Output appears in the Run tool window. The first run creates a temporary Run/Debug configuration, and every run, debug or test action starts from one of these configurations using its parameters.

  1. Run the script once so PyCharm creates the temporary configuration.
  2. Open Run, then Edit Configurations.
  3. Adjust the fields described below.
  4. Save it as a permanent configuration.

Script path or Module name sets what actually runs. Parameters take arguments separated by spaces, with double quotes around any value that contains a space. Environment variables open an editor on Shift+Enter, and a second field takes paths to .env files. The working directory deserves its own paragraph, because it causes most surprises.

Created through Ctrl+Shift+F10 or the Run context menu, a configuration uses the folder that contains the script as its working directory. That can differ from the project folder, so relative file paths may resolve somewhere you did not expect.

Leave the field blank and PyCharm falls back to the bin directory of its own installation (PyCharm 2026.2 documentation).

The Python Interpreter field picks the environment, and Run with Python console executes the script inside the console. Running from that console or the terminal also works, and a separate guide covers ways to run code in PyCharm in more detail.

Configurations are stored in .idea/workspace.xml unless you enable Store as project file. Several of them can run in parallel through a compound configuration, and debug sessions reuse the same settings, so fix the interpreter and working directory here first.

How to Debug Python Code in PyCharm

Debugging means running the script with breakpoints that freeze execution, so you can read variable values at that exact moment. For a simple script, the debugger needs no setup beyond the interpreter you already configured.

  1. Click the gutter next to an executable line to set a breakpoint, or press Ctrl+F8 with the caret on it.
  2. Right-click in the editor and choose Debug followed by the file name, or press Shift+F9.
  3. Wait for execution to suspend at the breakpoint. The Debug tool window now shows the program state.
  4. Read variables, evaluate expressions and add watches, then step forward.

The same workflow, with more screenshots, is laid out in a separate guide on how to debug in PyCharm.

Step Over (F8) moves to the next line without entering method calls. Step Into (F7) enters the method called on the line, and asks which one when a line has several calls. Step Out (Shift+F8) leaves the current method and returns to the caller.

Step Into My Code (Alt+Shift+F7) skips library code, and you can switch back to Step Into mid-session. Those are the Windows and Linux defaults. Run to Cursor (Alt+F9) is the quick option when you only want to reach one line.

Right-click the line number and choose Add Conditional Breakpoint to suspend only when a Python Boolean expression is true. Add Logging Breakpoint prints a message instead, and Shift+click on the gutter creates one in a single move.

JetBrains suggests logging breakpoints over print statements, since they sit in one place and leave the source untouched. Exception breakpoints stop where the error is raised, while the surrounding data still exists, and you add them from the Breakpoints dialog (Ctrl+Shift+F8).

The debugger has gaps. debugpy, the default for Python 3.9 or later on local and WSL interpreters, does not cover remote interpreters over SSH or Docker, Attach to Process, remote Jupyter notebooks or most manage.py tasks (JetBrains debugger documentation, PyCharm 2026.2).

Switch to pydevd under Settings, Python, Debugger when debugpy falls short. For remote targets, Attach to DAP connects to a debugpy server running there.

How to Run Tests with pytest in PyCharm

pytest runs from the IDE once it is installed in the project interpreter and chosen as the default test runner. PyCharm auto-detects a runner installed on the interpreter, yet the documentation still names unittest as the suggested default, so setting pytest by hand removes the guesswork.

  1. Install pytest into the project interpreter from the Python Packages tool window.
  2. Press Ctrl+Alt+S, open Python, Tools, Integrated Tools, and pick pytest in the Default test runner list.
  3. Right-click a test file, class or folder in the Project tool window and choose the Run pytest command. Right-click inside a method to run only that test.
  4. Read the results on the test tab of the Run tool window.

If the chosen runner is missing from the interpreter, a notification appears with a Fix button that installs it. The steps for running pytest in PyCharm are also covered in a dedicated guide.

FrameworkCode completionInspections
pytestYesYes
unittestYesPartially
nosetestsPartiallyPartially

pytest is the only one of these with full inspections (JetBrains testing frameworks documentation, 2026). Both pytest and unittest handle ordinary unit testing, and PyCharm even types arguments injected by @patch as MagicMock.

Ctrl+F5 reruns the whole session. The Run tool window toolbar has a Rerun Failed Tests button and a Rerun Automatically toggle that reruns on every source change. A checkbox called Drop into debugger on failed tests sits under the Python Debugger settings.

Parallel runs need the pytest-xdist package. Add -n and a CPU count to Additional Arguments in the run configuration, and JetBrains’ own example dropped total time from 35 s 11 ms to 20 s 26 ms.

A value set in the run configuration overrides the same setting in pytest.ini.

Watch out for old configurations. A test run configuration that already exists for a file wins over the default runner, so changing the default does nothing for files that already have one. Edit or delete the old configuration.

How to Use Git in PyCharm

Git works from the first launch. PyCharm detects an installed Git when you clone or enable version control, and offers to download one if it finds none.

On Windows without Git, it searches inside WSL instead.

Starting a repository

Clone from the Welcome screen, or use Git, then Clone once a project is open. For an existing project, press Alt+backtick for the VCS Operations Popup and pick Enable Version Control Integration. A fresh local repository gets its remote through the Define remote link in the Push dialog.

A cloned repository gets its remote configured automatically under the default name origin. Signing in to a hosting service from the Clone dialog is covered in a guide on how to connect PyCharm to GitHub.

Making your first commit and push

  1. Open the Commit tool window with Alt+0 and expand Unversioned Files.
  2. Select the files and press Ctrl+Alt+A to add them.
  3. Write the commit message. If no Git username is set, PyCharm asks for one at this point.
  4. Click Commit, or Commit and Push (Ctrl+Alt+K).
  5. Push later with Ctrl+Shift+K.

Keep the virtual environment out of the repository: right-click the .venv folder, then Git, then Add to .gitignore.

Ticking only some chunks in the diff commits part of a file. Tests can also run before every commit, through Show Commit Options, Advanced Commit Checks and the Run Configuration entry (Git and Mercurial only).

The Force push option runs git push –force-with-lease, a safer variant than a plain force push.

Branches and merge conflicts

Git merges changes to different lines on its own. Only the same lines changed on both sides stop the operation.

In the Conflicts dialog, Accept Yours keeps the checked-out branch and discards the incoming one, and Accept Theirs does the reverse. Resolving manually opens three panes: the local copy on the left, the repository version on the right and an editable result in the middle.

Apply All Non-Conflicting Changes clears the easy parts first, which leaves only the real conflicts. For the Git side of the same problem, see this guide to resolving merge conflicts in Git.

Branch actions sit in the VCS widget in the window header.

Line endings cause quiet trouble in mixed teams. Windows writes CRLF while Linux and macOS write LF, which creates noisy diffs. Enable Warn if CRLF line separators are about to be committed under Version Control, Git, and PyCharm offers to set core.autocrlf to true on Windows or input elsewhere.

Which PyCharm Pro Features Are Worth Using?

Pro changes how a project gets built mostly through interpreters on remote machines or in containers, framework-aware web projects and the Database tool window. Each one comes with documented limits worth knowing before you switch it on.

Remote interpreters over SSH, Docker and WSL

A remote interpreter lets the IDE run, debug and test code somewhere other than your laptop. The Python Interpreter selector, then Add New Interpreter, leads to the On SSH, On Docker and On WSL options.

SSH needs an SSH server running on the host plus a password or key pair, and a Windows machine cannot serve as the remote host. With Docker you pull an image tag or build from a Dockerfile. You cannot install Python packages into a Docker-based project interpreter, and every run, debug or test run starts a new container.

The Docker route suits teams that want code to execute inside a Docker container close to production. Docker itself must be installed and running first.

After switching to an SSH interpreter, PyCharm offers to auto-upload files on save. Accept it, or the remote copy goes stale.

Django and Flask projects

JetBrains’ framework table for 2026.2 lists two Pro-supported frameworks, and they do not get identical treatment.

FrameworkProject typeCompletion and inspectionsTest configurations
DjangoYesYesYes
FlaskYesNot listedNot listed

FastAPI is absent from that table, although the documentation has a separate page on creating a FastAPI project.

Notebooks and databases

Sources inside the JetBrains documentation disagree on Jupyter. The unified overview puts Jupyter Notebook support in the free core, while the Process data section of the quick start guide still describes notebook integration under Pro.

The unified overview, the installation guide and the 2025.3 release post all state it explicitly, and the quick start guide’s own edition section agrees, so treat the Pro wording in its Process data section as leftover pre-unification text. A guide on working with Jupyter notebooks in PyCharm covers the notebook workflow itself.

Pro does not create databases, but the Database tool window (View, Tool Windows, Database) manages and queries existing data sources. Pro also adds Django, Jinja2, JavaScript and Jupyter exception breakpoints.

On the plus side, Pro gets you remote and container interpreters, framework project templates, database queries without leaving the IDE and extra exception breakpoint types. The downsides are a paid subscription after the trial, the remote limits (no Windows SSH host, no package installs into Docker interpreters, no debugpy on remote targets) and documentation pages that still mix Community and Pro wording.

What Goes Wrong in PyCharm and How to Fix It

Most problems come down to project analysis still running, low heap memory, an invalid breakpoint, an unsupported interpreter or a Git executable PyCharm cannot find.

SymptomCauseFix
Smart features missing or laggy after opening a projectProject analysis (called indexing before 2025.3) is still runningWait for the status bar to clear, and mark generated folders as Excluded
Slowdowns or a Low Memory warningFree heap fell under 5% after garbage collectionHelp, Change Memory Settings, then Save and Restart
Breakpoint shows as invalidNo executable code on that lineMove it to an executable line, and check that breakpoints are not muted
Interpreter marked unsupportedPython version outside the supported rangeSwitch to a supported version
Git actions failGit executable not foundInstall Git, or set Path to Git executable under Version Control, Git

Project analysis triggers after opening or cloning a project, enabling plugins and switching branches, and it cannot be sped up once running. Right-click a folder, then Mark Directory As, then Excluded, and the next run skips it (JetBrains project analysis documentation, 2026).

The Show Memory Indicator checkbox under Settings, Memory Usage puts a live reading in the status bar. For the unsupported interpreter case, a walkthrough on changing the Python version in PyCharm covers the switch.

When another tool fits better

A single quick edit doesn’t need a project, since LightEdit mode opens a file without creating one. Hardware near the minimum spec means memory warnings, so plan to raise the heap.

PyCharm pays off on multi-file projects with tests, a debugger and version control. For a ten-line script, the project setup costs more than it returns.

PyCharm FAQ

What does PyCharm do that a plain code editor does not?

YouTube player

A plain editor edits text and leaves the rest to you. PyCharm ties interpreter management, code inspections, a debugger, a test runner and Git to one project, so they all know about each other.

Is PyCharm better than Visual Studio Code for Python?

For large Python projects, yes. Refactoring, the debugger and interpreter management ship built in, while Visual Studio Code gets them through extensions. For quick edits across several languages, the lighter editor wins.

The trade-offs are laid out in this VS Code versus PyCharm comparison.

How do I change the theme, font or keymap?

Press Ctrl+Alt+S. Themes sit under Appearance and Behavior, Appearance, and fonts and colors under Editor.

Keymap offers presets such as Eclipse, Visual Studio and NetBeans, and the IdeaVim plugin adds Vim emulation.

Can I create a Jupyter notebook without a project?

Yes. Click the Notebook button on the Welcome screen and PyCharm adds the file to an automatic PyCharmMiscProject, so you can write and run cells with no further setup.

How do I install a plugin in PyCharm?

Press Ctrl+Alt+S, open Plugins, search the Marketplace tab and click Install. The Installed tab lists bundled plugins, and any of them can be switched off.

A list of the best PyCharm plugins helps with choosing.

Does PyCharm include AI coding help?

Yes. PyCharm 2025.3 introduced Claude Agent alongside an AI chat, and the Welcome screen offers Create a new project with AI (JetBrains, 2025; PyCharm 2026.2 documentation).

Access terms differ by subscription, so check the JetBrains store before relying on it.

Which PyCharm Habits to Build First

Check the interpreter in the status bar before anything else. Then get used to Search Everywhere and Alt+Enter, and reach for breakpoints instead of print statements when something misbehaves. The order matters.

The interpreter comes first because completion, inspections and every run resolve imports against it, and a wrong one produces false errors that cost more time than any shortcut saves. Search comes next because it pays off in every session, while the debugger pays off only when something breaks.

The trade-off: refactoring tools and Git features wait until those habits feel automatic.

This order was checked against the PyCharm 2026.2 documentation in October 2026. A change to the free and Pro boundary or to keymap defaults would reorder it, which makes updating PyCharm a reason to recheck the shortcuts.

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.