PyCharm

How to Install Pip in PyCharm Explained

How to Install Pip in PyCharm Explained

To install pip in PyCharm, run python -m ensurepip –upgrade in the Terminal tool window while the project interpreter is active.

Most projects never get that far. Virtual environments created by the venv module or by PyCharm’s bundled virtualenv tool include pip by default, and PyCharm uses pip by default to manage project packages.

The package list is where people get stuck. It can’t restore a missing pip, because PyCharm’s packaging helper calls pip to do the work. Once pip is gone, the Install button fails with “No module named pip” (JetBrains Support, 2025).

If ensurepip isn’t available, get-pip.py from bootstrap.pypa.io is the fallback.

Does PyCharm already include pip?

Usually, yes. A virtual environment built with the venv module ships with pip, and so does Python downloaded from python.org.

Environments built with venv on Python 3.4 or later have it. So do the ones PyCharm creates with its bundled virtualenv tool, and any Python build that still contains the ensurepip module.

The gaps are narrower. An environment created with –without-pip won’t have it, and neither will a base Python with ensurepip stripped out. Same for an interpreter where somebody uninstalled pip by hand.

The venv documentation says pip is bootstrapped by default since Python 3.4. The ensurepip page lists skipped installs and manual uninstalls as the reasons you’d ever need it (Python documentation).

To check, opening the Terminal tool window in PyCharm is the first move (View | Tool Windows | Terminal, or Alt+F12). Then run this:

python -m pip --version

A working install prints the pip version and the path to the pip package inside site-packages, followed by the Python version in parentheses.

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 →

“No module named pip” means that interpreter has no pip at all.

The package list in the Python interpreter settings gives you a second look. If pip shows up there, it’s installed.

Which interpreter will pip install into?

Whichever one the project is using right now. Every interpreter has its own pip and its own site-packages folder, so nothing is shared between them.

In PyCharm 2026.2 the settings page opens with Ctrl+Alt+S, then Python | Interpreter. Older builds list it under Project: (project name) | Python Interpreter (JetBrains Help).

Compare the interpreter shown there with the path printed by the pip version check. If they differ, the terminal isn’t using the project interpreter, and anything you install ends up in the wrong place.

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.

Project virtual environment

This is the safest target. PyCharm builds these with the virtualenv tool bundled with the IDE (JetBrains Help), and virtualenv installs pip unless told to skip it (virtualenv documentation).

To make one:

  1. Click the Python Interpreter selector and choose Add New Interpreter
  2. Select Add Local Interpreter
  3. Pick Virtualenv as the environment type
  4. Point the location at an empty directory

If the project is tied to the wrong environment, it needs a different interpreter instead. The full steps for adding a Python interpreter in PyCharm walk through that dialog in detail.

System interpreter

Avoid it for project work.

Anything pip installs lands in the base Python’s site-packages, and every project pointing at that Python shares the folder.

Linux adds another snag. Distributions can mark the base environment as externally managed under PEP 668. Debian and Ubuntu do this to their system Python, with an EXTERNALLY-MANAGED marker in /usr/lib/python3.X/, and the resulting error message points to apt install python3-xyz or to a virtual environment (PEP 668).

The way out is to create a fresh virtual environment in PyCharm and point the project at it.

Conda environment

A conda interpreter pulls packages from somewhere else. The Python Packages tool window lists packages from the PyPI repository and, for conda environments, from the conda repository as well (JetBrains Help, PyCharm 2026.2).

Look at the environment type before picking an installer.

How to install pip in PyCharm

YouTube player

Open the Terminal tool window with the project interpreter active and run python -m ensurepip –upgrade. If that fails, download get-pip.py from bootstrap.pypa.io and run python get-pip.py instead.

The pip maintainers support both of these directly (pip documentation).

  1. Open the Terminal tool window (View | Tool Windows | Terminal) and check that the prompt shows the environment name in parentheses.
  2. Run python -m ensurepip –upgrade. On Windows the pip documentation also lists py -m ensurepip –upgrade.
  3. If ensurepip is missing or errors out, run python get-pip.py in the folder that holds the downloaded script.
  4. Confirm with python -m pip –version.
  5. Open the Python interpreter settings and check that pip appears in the package list.

Stick with the python -m form the whole way through. It ties the command to one interpreter, and the pip documentation uses it for upgrades too.

MethodCommand or actionNeedsFails when
ensurepippython -m ensurepip –upgradePython 3.4 or later, module intactDistributor removed it, or site-packages is externally managed
get-pip.pypython get-pip.pyDownload from bootstrap.pypa.ioNo network and no local copies
System package managerapt install python3-pip (Debian, Ubuntu)Linux, root rightsBuild is modified by the redistributor
New virtual environmentAdd New Interpreter, Add Local Interpreter, VirtualenvA supported base Python interpreterBase interpreter is missing or unsupported (Invalid environment warning)

Install pip with ensurepip

ensurepip installs the copy of pip that ships inside Python, so there’s nothing to download (Python documentation). The –upgrade flag bumps pip to at least the bundled version.

PyCharm’s own Install button can’t fix a missing pip, since its packaging helper calls pip to do the work (JetBrains Support thread). Python’s documentation points to ensurepip for exactly this situation, which leaves the terminal as the only route that works.

One limit worth knowing. ensurepip has no –break-system-packages option, so it can’t write into an externally managed site-packages (CPython issue 118384, discussed on discuss.python.org).

And if the environment itself is the problem, the quickest reset is to delete the broken venv and let PyCharm build a new one.

Install pip with get-pip.py

Download it only from bootstrap.pypa.io. The pypa/get-pip README tells users not to reference the repository files directly.

On Python 3.11 and older, setuptools and wheel come along when no existing version is found. On Python 3.12 and newer you get pip and nothing else, and the –no-setuptools and –no-wheel flags do nothing. You can also pass extra arguments to constrain the pip version, or add –no-index –find-links to install from local copies.

That split comes from the current README, read in October 2026. Older tutorials promise setuptools and wheel on every Python version, which is no longer true.

Save the script outside the project folder so it never reaches version control.

Install pip with a system package manager

This one is Linux only, and it only touches the system interpreter.

On Debian and Ubuntu the package is python3-pip. Redistributors sometimes modify pip, which the pip maintainers call a frequent source of user confusion (pip documentation).

Project virtual environments stay untouched by it. Later installs can also run into PEP 668 errors on distributions that mark the base environment as externally managed.

For project work, a virtual environment bootstrapped with ensurepip is the simpler route.

How to upgrade pip in PyCharm

Run python -m pip install –upgrade pip in the Terminal tool window of the project interpreter. The Python Packages tool window and the Python interpreter settings get you to the same place with a button.

Upgrade in the Terminal

Windows users can run py -m pip install –upgrade pip instead, a form the pip documentation lists next to the Unix one.

Skip the system interpreter here. PEP 668 suspects that user reports of deleted distro packages on Debian trace back to sudo pip install –upgrade pip, which replaces the patched /usr/bin/pip.

Upgrade in the Python Packages tool window

As of the PyCharm 2026.2 Help, an Update button appears next to any package with a newer release. pip is no exception.

  1. Open View | Tool Windows | Python Packages
  2. Find pip in the installed packages
  3. Click Update next to its name

The same window handles installing other packages in PyCharm, including a pinned version or extra pip options through the Install with Options entry.

Upgrade in the Python interpreter settings

Go to Settings | Python | Interpreter and select the interpreter. Pick pip in the list, click Upgrade on the toolbar, then OK. To upgrade several packages at once, hold Ctrl (Cmd on macOS) while selecting them.

The Latest version column shows stable releases only. Clicking Show early releases extends it to betas and release candidates (JetBrains Help).

Why does pip fail in PyCharm, and how do you fix each error?

Pip problems in PyCharm usually come down to a missing module, a command the shell can’t find, a system interpreter marked as externally managed, or a terminal that never activated the environment. Each one has a single cause and a single fix.

SymptomCauseFix
No module named pipInterpreter has no pipRe-create the environment or bootstrap pip again
pip is not recognizedScript folder not on PATH, environment not activeUse python -m pip
externally-managed-environmentSystem interpreter marked under PEP 668Switch to a project virtual environment
Packages land in the base PythonTerminal never activated the venvActivate by hand, then check terminal settings

No module named pip

There’s a documented case of this. In February 2025 a user on PyCharm Community 2024.3.1.1 (Windows) clicked Uninstall on pip in the package list (JetBrains Support thread).

Every reinstall attempt after that raised ImportError, including a run of PyCharm’s packaging helper from the command line with the environment’s python.exe. The reply in the thread was to re-create the virtual environment.

A full reinstall of PyCharm changed nothing, because the environment folder sits outside the IDE install.

Re-creating the environment does cost you something. Every installed package is dropped unless a requirements.txt exists. Bootstrapping pip again keeps them.

pip is not recognized

A bare pip command only works when the folder holding the pip script is on PATH, or when the environment is active.

PyCharm’s Terminal normally activates a virtual-environment interpreter on its own, and the Activate virtualenv option in Settings | Tools | Terminal controls that behavior (JetBrains Help).

python -m pip needs no PATH entry for the pip script. On Windows, py -m pip does the same thing.

Externally managed environment

PEP 668 (status Final, now maintained as a PyPA specification) tells installers to exit with an error when two conditions hold. The interpreter runs outside a virtual environment, and an EXTERNALLY-MANAGED file sits in its standard library directory.

Select a project virtual environment as the interpreter and the error goes away. The check applies only outside virtual environments, so they’re exempt.

A –break-system-packages flag does exist, and the PEP specifies that its name should carry a connotation of risk.

The reason behind the rule is plain enough. A newer package pushed in through pip can break software the distro ships, including distro tools written in Python.

Packages install into the wrong environment

One older JetBrains Support thread describes a venv whose site-packages held only setuptools and pip, while every other package had gone into the base Python.

The cause was the Terminal never activating the environment, so pip wrote to the base interpreter. Running the activate script by hand (activate.bat in the Scripts folder on Windows) works as a temporary fix. Checking the venv’s site-packages folder tells you where packages actually went.

Users in the same thread report that the activation option in the terminal settings was enabled and the environment still didn’t activate, and that PyCharm had hidden the error thrown by activate.bat. The path printed by the pip version check settles it, not the prompt.

When does pip not manage the packages in PyCharm?

When the project interpreter is a Pipenv, conda, Poetry or uv environment. PyCharm then routes package changes through that environment’s own tool.

EnvironmentPackages managed throughPyCharm actions
Pipenvpipenv, recorded in PipfileInstall pipenv via pip (one-time setup)
Condaconda package managerUse Conda Package Manager toggle
PoetryPoetry, recorded in pyproject.tomlPoetry Lock, Poetry Update
uvuv, with uv.lockuv Lock, uv Sync

Pipenv and Poetry have one thing in common. pip’s only job inside PyCharm is installing the tool itself, through the Install pipenv via pip and Install poetry via pip buttons (JetBrains Help).

Conda is the odd one out. PEP 668 expects pip to keep behaving inside conda environments as it always has, so pip still works there, while PyCharm switches the conda package manager toggle on by default for them.

Packages installed with conda or pip carry different icons in the Python Packages tool window, so you can always see where each one came from.

Read the environment type in Settings | Python | Interpreter before installing anything. In a Pipenv, Poetry or uv environment, change dependencies through that tool, because a missing pip isn’t what’s going on.

Choosing between them is a project-level decision, and a comparison of venv, conda and Poetry covers the trade-offs.

FAQ About pip in PyCharm

Does pip work in PyCharm Community Edition?

Yes, and it works in the unified PyCharm that replaced it. PyCharm Community 2025.2 was the last Community Edition release, and the unified product keeps core features free with extra features in a Pro subscription (JetBrains Help). The documented “No module named pip” recovery case came from PyCharm Community 2024.3.1.1, and JetBrains Help describes no Pro-only restriction on package management.

The differences between Community and Professional sit in other features.

What is the difference between pip, pip3 and python -m pip?

pip3 targets a Python 3 install, while python -m pip runs the pip that belongs to one specific interpreter. By default, ensurepip installs only the pip3 and pip3.x scripts, and a plain pip script appears only with the –default-pip option (Python documentation).

How do I install packages from requirements.txt in PyCharm?

Add the file to the project and PyCharm prompts you to install the packages it lists (JetBrains Help). In the Terminal, pip install -r requirements.txt does the same job for the active environment.

A project with no interpreter also gets an offer to create a virtual environment from the file.

How do I install one package with pip in PyCharm?

Type the name into the search field of the Python Packages tool window and click Install. The Terminal route is python -m pip install package-name.

The window also lets you pick a version before installing.

How do I uninstall a package in PyCharm?

Click the Uninstall package button next to the name in the Python Packages tool window. In the Python interpreter settings, select the package and click Uninstall on the toolbar (JetBrains Help).

Leave pip itself in place, because removing it breaks the Install button.

A Setup That Keeps pip in PyCharm Working

Keeping pip working in PyCharm comes down to one project virtual environment per project, created before the first package goes in. A missing pip then costs you one rebuilt environment instead of a damaged system Python.

Create the virtual environment before anything else. Run every command as python -m pip, and export requirements.txt right after the first install.

Exporting early makes the re-create fix cheap, because PyCharm offers to install the packages a requirements.txt lists. Without the file, the same fix means reinstalling by hand.

The price is one full copy of every dependency per project.

This order was verified in October 2026 against PyCharm 2026.2 Help. It changes if PyCharm’s packaging helper stops calling pip, because the Install button would then repair a missing pip itself.

With pip confirmed, installing libraries in PyCharm is the next step.

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.