PyCharm

How to Install Packages in PyCharm Quickly

How to Install Packages in PyCharm Quickly

In PyCharm, installing a package mostly comes down to one search and one click. Open the Python Packages tool window, type the name, pick a version and press Install. Behind that click, PyCharm runs pip against whichever interpreter the project is currently using, and that detail is where most of the trouble starts.

Each interpreter keeps its own package list. Add a library to one virtual environment and another environment won’t see it. Run pip in a terminal that sits outside the project environment and the package lands somewhere else entirely (JetBrains Guide).

The tool window dates back to PyCharm 2021.1 (JetBrains PyCharm 2021.1 release notes), so any tutorial that begins in the Settings dialog is showing you the slower route.

How to Install a Package with the Python Packages Tool Window

YouTube player

Open the window, search for the package, choose a version if you care about one, and click Install. PyCharm adds the package to the interpreter selected for the project.

JetBrains treats this as the quickest route, and the window is turned on by default (PyCharm 2026.2 Help, last updated August 2026).

  1. Open the tool window from View > Tool Windows > Python Packages, or click Python Packages in the left toolbar.
  2. Type the package name in the search field. Results come from PyPI, and from the conda repository too when the project uses a conda environment.
  3. Click a result to preview its documentation in the side area.
  4. Pick a version from the version list, or leave it on the latest.
  5. Click Install. If the install fails, a popup tells you.

PyCharm 2026.2.1 (released 12 August 2026) redesigned the window, so your build may not match the steps above exactly. Search now opens in a floating popup that shows which environment will be used, and installing from a VCS moved under Custom Installation (JetBrains blog, What’s New in PyCharm 2026.2.1). The steps follow the 2026.2 help pages, so a label or two might differ.

NumPy makes a decent first test. Type numpy, click Install, and it shows up in the installed list once pip finishes. A separate guide on installing NumPy in PyCharm goes into more detail.

Need pip arguments such as –pre or –extra-index-url? Right-click next to the package name and choose Install with Options.

Older documentation talks about buttons named Install with pip and Install with conda. The 2026.2 documentation has a single Install button, and installed packages carry a pip or conda icon. The window itself has been around since PyCharm 2021.1 (JetBrains PyCharm 2021.1 release notes), which explains why the old wording is still floating around.

Plenty of blog tutorials, Finxter’s among them, still start from the Settings dialog and the + button. JetBrains documents both routes and lists the tool window first, so it’s a question of speed more than capability.

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 →

Other Ways to Install a Package in PyCharm

The Python Interpreter settings, an Alt+Enter quick-fix on an unresolved import, and pip in the Terminal tool window all install into the same project interpreter as the tool window does. Which one you reach for depends on what you’re doing when the need comes up.

RouteWhere to startBest forMain limit
Python Packages tool windowLeft toolbarSearching PyPI, previewing docsDepends on the selected interpreter
Interpreter settingsCtrl+Alt+S, Python > InterpreterComparing installed and latest versionsMore clicks per package
Alt+Enter quick-fixCaret on an unresolved importInstalling while you codeImport name can differ from package name
Terminal with pipAlt+F12Flags, requirements files, scripted setupsShell may not use the project environment

Python Interpreter settings

Press Ctrl+Alt+S, open Python > Interpreter and pick the interpreter (PyCharm 2026.2 Help). Older releases put the same screen under Project > Python Interpreter.

  • Click Install on the toolbar and search in the Available Packages dialog
  • Tick Specify version to choose a release, since the latest is the default
  • Tick Options if you want pip install flags
  • Select the package, then click Install Package

The list shows Version and Latest version side by side, with an upgrade arrow on anything outdated. The Latest version column only shows stable releases until you click Show early releases.

Alt+Enter quick-fix on an unresolved import

This one is the fastest when you’re in the middle of a file.

Put the caret on the underlined import, press Alt+Enter and choose Install package. It works on a highlighted name in the dependencies array of pyproject.toml too (PyCharm 2024.3 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.

The catch is that import names don’t always match package names. cv2 comes from opencv-python and sklearn comes from scikit-learn, so read the suggested package before you accept it.

Terminal with pip

The embedded shell is the most flexible route and the easiest to get wrong. It runs whatever Python the shell finds first, and that isn’t always the project interpreter.

Alt+F12 opens the Terminal tool window. The walkthrough on opening the terminal in PyCharm covers the other ways in.

Run python -m pip install requests, which ties pip to the interpreter that runs the command. Then run pip –version and read the path it prints.

If that path points at a system Python and not the project’s environment folder, the package went to the wrong place. The JetBrains Guide lists installing from a terminal without the virtual environment activated as one way this kind of error happens.

Installing Every Package from requirements.txt

Add requirements.txt to the project and click Install requirements in the notification PyCharm shows. Running pip install -r requirements.txt in the Terminal tool window does the same job.

  1. Put requirements.txt in the project root. A file with that name is detected automatically. If it’s named something else, or you keep several requirements files, point PyCharm at the right one under Settings > Python > Tools > Integrated Tools, in the Package requirements file for SDK field.
  2. Check the interpreter in the status bar selector. The packages install there.
  3. Open the file and click Install requirements in the notification. PyCharm also flags gaps through the Unsatisfied package requirements inspection.
  4. Prefer the terminal? Run pip install -r requirements.txt from the project folder.
  5. Confirm every line landed in the Python Packages tool window.

The -r flag matters. Leave it out and pip reads requirements.txt as a package name. At least one published tutorial (QA Source, 2023) prints the command written that way.

According to the pip documentation on the requirements file format, the file can hold plain package names, names with version specifiers, and comments that start with #. A line like -r other-requirements.txt pulls in a second file.

requirements.txt is not the only file PyCharm reads.

pyproject.toml works too. List packages in the dependencies array under [project], and a highlighted name means it’s missing from the interpreter. Alt+Enter then offers Install package.

Pipenv and Poetry projects run through their own files. In a pipenv environment, packages install, update and remove through pipenv instead of pip, following the Pipfile. Choose a Poetry environment when you create a new project and PyCharm writes a pyproject.toml with the project requirements.

Moving packages between projects? Run pip freeze > requirements.txt in the source project, copy the file across, and PyCharm prompts you to install what it lists (PyCharm 2026.2 Help).

A pinned version that no longer exists on the package index makes pip stop the run. Fix the line or loosen the pin, then run the command again.

Which Environment Does PyCharm Install Into, and How to Check It

PyCharm installs into the project interpreter, the one shown in the Python Interpreter selector on the status bar. Because every interpreter has its own package list, something installed for one environment never appears in another.

Checking the project interpreter

Look at the status bar selector first. Click it to see the list of interpreters, or choose Interpreter Settings, which opens Python > Interpreter (Ctrl+Alt+S gets you there too).

The Interpreter path field shows the Python executable. An Invalid environment warning means the binary is missing or its Python version isn’t supported (PyCharm 2026.2 Help).

A system interpreter is the global Python install, shared by every project that points at it. A virtualenv is a base interpreter plus its own packages. Conda environments install through the conda package manager as long as the Use Conda Package Manager toggle is on, which is the default. With pipenv, installs run through pipenv and follow the Pipfile. For Poetry, uv and Hatch, PyCharm detects the executable and then creates or reuses the environment.

Use one virtual environment per project and leave the system interpreter alone. JetBrains calls a separate set of packages for each project a best practice, and a global install forces every project onto the same versions.

No environment yet? The steps for creating a virtual environment in PyCharm cover the setup.

Not sure which type to pick? A comparison of venv, Conda and Poetry lays out the trade-offs.

Verifying a finished install

Start in the Python Packages tool window, where the package should be in the installed list with its version. Then run pip list in the terminal and look for the same package and version. Last, open the Python Console and import it, for example import numpy, and see whether an error comes back.

If the tool window and the terminal disagree, the shell is not using the project interpreter.

That mismatch is a common reason an install seems to succeed while the import still fails.

How to Install a Specific Package Version, Upgrade It or Remove It

Pick the version from the version list before you click Install, or write a version specifier such as numpy==1.26.4 in the terminal or in requirements.txt. Both routes run pip against the project interpreter.

SpecifierMeaningExample
==Exactly this versionnumpy==1.26.4
~=This version or later, same release seriesnumpy~=1.26.0
>=This version or newernumpy>=1.26
!=Anything except this versionnumpy!=1.26.3

Commas join clauses with a logical AND, so numpy>=1.26,<2.0 accepts anything from 1.26 up to, but not including, 2.0 (PEP 440).

The ~= operator works best on projects that number releases as major.minor.micro, the pattern semantic versioning describes.

Exact pins or ranges is a fair question. PEP 440 strongly discourages strict == matching on published libraries, since it complicates security fixes, and reserves it for repeatable deployments of applications.

So pin exactly in an application’s requirements.txt. Use ~= or >= when you publish a library.

Pre-releases stay out of the match. PEP 440 excludes alpha, beta and release candidate builds unless you ask for them, they are already installed, or nothing else satisfies the specifier. That’s where the –pre flag in Install with Options comes in.

To upgrade, click Update next to the package name in the Python Packages tool window. In the interpreter settings you can hold Ctrl (Cmd on macOS), select several rows and click Upgrade to update them together.

Downgrading means picking the older release from the version list and clicking Install, or running pip install numpy==1.26.4 over the newer one.

To remove a package, use the Uninstall package button next to the name in the tool window, or the minus button in the interpreter settings.

A pin in requirements.txt does not follow your upgrade. Change the pin by hand, or the next install from that file puts the old release back.

Installing Packages from GitHub, a Local File or a Custom Repository

When a package isn’t on PyPI, Advanced Package Install in the Python Packages tool window handles a Git URL or a file on disk, and a package repository handles a private index. All of it installs into the same project interpreter as a normal PyPI install.

GitHub and other VCS links

Click Advanced Package Install, to the right of the search bar, and enter the repository path. Tick Editable (-e) when you’re working on the package itself (PyCharm 2026.2 Help). In the window redesigned for PyCharm 2026.2.1, JetBrains’ release notes list this route as Custom Installation.

The dialog accepts the URL forms pip documents. HTTPS looks like git+https://github.com/owner/project.git and SSH like git+ssh://git@github.com/owner/project.git. Add @v1.0, a branch name or a full commit hash after the URL to pin a ref. When the package isn’t at the repository root, append #subdirectory=pkg\_dir.

pip needs a working git executable on the machine for any of this. It also keeps an installed version in place unless the upgrade flag is set, even when the VCS source is newer (pip documentation, VCS Support).

Skip the git://, git+git and git+http schemes. pip’s docs discourage them because they lack authentication or encryption.

Local files and wheels

Same dialog, different input. Point it at a package directory or an archive on disk, which can be a wheel (.whl), a zip source archive or a plain package folder.

Source installs build on your machine, so the project’s build backend (setuptools, for example) has to be installable too. A wheel is prebuilt and skips that step, which makes it the safer file to hand around.

Custom repositories

Open Settings > Python > Package Repositories, or click Options in the upper right of the tool window, then add the URL. JetBrains names devpi and private PyPI servers as examples.

The dialog asks for a name, which is the label PyCharm shows in the tool window, and the repository URL it searches and installs from. Authorization is either None or Basic HTTP with a login and password. Enable Repository decides whether PyCharm queries the index at all, since a disabled one is skipped during search.

PyPI comes preconfigured. You can switch it off, but you cannot remove it, rename it or change its URL (PyCharm 2026.2 Help).

Only two authorization modes exist in the dialog. An index that needs anything else goes through the terminal, or through Install with Options and an index flag.

Why a PyCharm Package Install Fails

A failed install usually names its cause in the error text, and the fixes rarely overlap. The table pairs each symptom with a cause and a fix.

SymptomCauseFix
ModuleNotFoundError or unresolved reference after a clean installCode runs on a different interpreter than the one that received the packageMatch the status bar interpreter, then reinstall there
error: externally-managed-environmentSystem Python marked by the OS under PEP 668Move the project to a virtual environment
No matching distribution foundWrong name, Python outside the package’s range, outdated pip, unreachable indexCheck the name, run pip –version, upgrade pip or Python
SSL: CERTIFICATE\_VERIFY\_FAILED or a proxy timeoutCorporate certificate or proxy unknown to pipUpgrade pip, set a certificate bundle, set pip’s proxy
No module named pipEnvironment created without pipRun python -m ensurepip –upgrade

The externally-managed-environment error comes from PEP 668 (status Final, created 18 May 2021). It tells installers such as pip to exit with an error when they run outside a virtual environment and the interpreter ships an EXTERNALLY-MANAGED marker file.

The PEP gives its reason. A pip install into a distro’s Python can break system tools written in Python, and it names Fedora’s dnf as one of them.

pip offers –break-system-packages as an override, but the PEP wants that flag to carry a risky connotation. Create a virtual environment instead and point the project interpreter at it. Unpatched CPython builds and Conda environments keep their old behavior.

The “No matching distribution found” wording is identical whether you misspelled the name or the package’s Requires-Python rules out your interpreter.

A maintainer comment on pip issue 9615 explains why. Distribution is file-based, so different files of one version can carry different Requires-Python values, and a blanket “found but blocked” message for a version is not straightforward to produce.

Run pip –version first and read the Python version it reports. As of pip 26.2.1, pip itself supports CPython 3.10 through 3.15 and the latest PyPy3, and its maintainers do not support other versions (pip documentation).

SSL and proxy failures come from pip verifying HTTPS certificates by default. Since pip 24.2 it also trusts system certificates alongside certifi, while versions from 22.2 to 24.1 needed –use-feature=truststore to opt in (pip documentation).

Upgrading pip is the first move on an older environment. If the error persists, pass –cert or set PIP\_CERT with the path to your organization’s certificate bundle.

PyCharm’s HTTP Proxy page defaults to your system proxy settings and covers IDE connections such as plugin downloads, license checks and settings sync. It does not list pip among them, so set the proxy for pip itself with its –proxy option or pip config.

A missing pip is rarer. pip normally arrives with a virtual environment, with Python from python.org, and with Python builds that keep ensurepip. A redistributor that strips ensurepip leaves it out (pip documentation).

Run python -m ensurepip –upgrade in the Terminal tool window, then python -m pip install –upgrade pip. A separate guide covers installing pip in PyCharm step by step.

Installing Packages in PyCharm FAQ

Can you install several packages at once in PyCharm?

Yes. List them in requirements.txt and click Install requirements, or name them in one terminal command such as pip install numpy pandas requests.

pip resolves the whole set in one run, so a single conflicting pin stops the batch.

Does the free version of PyCharm install packages the same way as Pro?

Yes. Community and Professional were combined into one unified product with PyCharm 2025.1, with core features free and a Pro subscription for the extras. The package install steps in JetBrains’ documentation carry no edition split.

JetBrains lists remote interpreters over SSH, Docker, Docker Compose and WSL as Pro features.

Why does a package installed in an external terminal not show in PyCharm?

PyCharm lists only the packages of the project interpreter, and the pip in an outside shell often belongs to a different Python.

Run python -c “import sys; print(sys.executable)” in that shell, then compare the path with the Interpreter path field in the interpreter settings.

Is it ever fine to install packages into the system interpreter?

On an unpatched CPython build pip still allows it, and PEP 668 leaves that behavior unchanged. The cost is one shared package set for every project that points at that interpreter.

I’d keep it for throwaway scripts.

How do you update pip inside a PyCharm environment?

Open the Terminal tool window in that environment and run python -m pip install –upgrade pip (pip documentation).

Each virtual environment carries its own pip, so upgrading one leaves the others alone.

Keeping Installed Packages Reproducible Across Machines

Installing packages in PyCharm only becomes reproducible after the versions land in requirements.txt or pyproject.toml, because the interpreter’s package list lives on one machine.

Install into the project interpreter, record the pins in the same commit, then rebuild a fresh virtual environment from that file. The rebuild goes last because only a clean install exposes drift between the file and the interpreter. Push the commit after connecting PyCharm to GitHub so a teammate receives the same file.

pip freeze reports what is installed and computes no solver result. By default it omits pip, and on Python 3.11 and earlier it also omits setuptools, wheel and distribute (pip documentation, v26.2.1).

The experimental pip lock command writes a pylock.toml guaranteed valid only for the current Python version and platform, so the price is one lock file per target environment. This advice changes when pip lock leaves experimental status (position verified 7 October 2026).

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.