PyCharm

How to Install Libraries in PyCharm Fast

How to Install Libraries in PyCharm Fast

Installing a library in PyCharm starts in the Python Packages tool window. Search for the package name, click Install, and pick a version first if you need a specific one. PyCharm runs pip against whatever interpreter is attached to the open project.

Each project keeps its own package set, according to JetBrains documentation, so the selected interpreter decides where a library lands. Point a project at the system Python and that isolation is gone. On Linux distributions that mark their Python as externally managed under PEP 668, pip refuses the install outright.

How to Install a Library in PyCharm

YouTube player

The whole thing happens in one tool window. PyCharm runs pip against the project’s interpreter, so the library ends up in that environment and nowhere else.

  1. Open View | Tool Windows | Python Packages, or click Python Packages on the left toolbar.
  2. Type the package name into the search field. Results come from PyPI, and from the conda repositories too when the interpreter is a conda environment.
  3. Select the result. Click Install for the latest version, or pick a version from the list first.
  4. Wait for pip to finish. The library then shows up among the installed packages.
  5. Add the import to your code and run it.

The documentation area next to the search results previews the package description before you commit to an install. Handy when two packages have nearly the same name.

Right-click next to the package name and pick Install with Options to pass pip flags such as --pre or --no-deps, as the JetBrains help for PyCharm 2026.2 describes.

Search by the PyPI project name. The scikit-learn project imports as sklearn, so the search term and the import line differ.

Which Interpreter Does PyCharm Install Libraries Into?

Whichever interpreter is selected for the open project gets the install. JetBrains documentation describes one package set per project as the recommended way to manage Python dependencies.

Check the target before installing anything. The Python Interpreter selector in the status bar shows the active one, and Settings | Python | Interpreter lists every package inside it.

A project pointed at the system Python shares its packages with every other project on that Python, which is a mess I’d rather avoid. You can add a different interpreter and switch to it before you install anything.

Creating a project virtual environment

A project venv is the sensible default for scripts and apps. Pick Project venv in the New Project dialog, or add a new interpreter later and choose Virtualenv. With Project venv, PyCharm creates the environment in a .venv folder in the project root, using the Python version you select.

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 →

Step-by-step help is in the guide to creating a virtual environment in PyCharm. Every install after that goes into the new environment.

Using conda, Poetry, Pipenv or uv

PyCharm detects an installed conda, or you point it at the executable, and the interpreter settings page has a toggle for installing and upgrading from the conda repository. Poetry is available as an environment type. If PyCharm doesn’t detect it, the Install poetry via pip button handles that, and Pipenv follows the same flow with an Install pipenv via pip button. For uv, PyCharm detects the executable or you browse to it.

Since PyCharm 2025.3 (December 2025), the New Project wizard suggests uv by default when it finds uv on the system, according to the JetBrains release post.

For a plain script project, venv is enough. conda earns its place when a library depends on non-Python binaries, and Poetry or uv when pyproject.toml drives the project.

Which Installation Method Should You Use?

Start with the Python Packages tool window. Switch to the Terminal for pip flags and scripts, to the interpreter settings page for a full package list, and to the quick-fix when an import is already red.

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.

MethodBest forLimit
Python Packages tool windowSearching, previewing docs, one-click installNot scriptable
Interpreter settings pageReviewing every package of one interpreterSlower to reach
Terminal tool windowpip flags, requirements files, uv or Poetry commandsWrong environment if not the project one
Quick-fix on unresolved importInstalling straight from a red importInstalls the name you typed

To open the terminal inside PyCharm, use the Terminal tool window and run python -m pip install followed by the package name. Make sure the prompt shows the project environment before you hit enter.

The PyCharm 2026.2 release notes add that uv commands run directly in the built-in terminal inside the project environment.

The quick-fix works from the editor. Type an import for a package that is missing, press Alt+Enter on the red bulb, and PyCharm offers to download and install it (JetBrains help).

Check the suggested name before accepting, since some import names differ from their PyPI names. PIL comes from Pillow, and cv2 from opencv-python. You’ve already seen sklearn and scikit-learn above.

The tool window has existed since PyCharm 2021.1, per the JetBrains release announcement. Its current help page lists no edition restriction.

PyCharm 2025.2 was the last standalone Community release, and from 2025.3 one unified product serves free and paid users (JetBrains, December 2025). Feature differences between the Community and Professional editions sit outside package installation.

How to Install a Specific Version, or Install From Git, Disk or a Custom Repository

Versions come from the list in the Python Packages tool window. Git URLs and local paths go through Advanced Package Install, and private indexes need a repository added first.

Pinning a version

The tool window handles a simple pin. Expand the version list, select the release, click Install. Ranges need the terminal.

OperatorEffectExample
==Exact release onlyname==1.4.2
>=Floor, newer releases allowedname>=1.4
~=1.4 or later, below 2.0name~=1.4
!=Skips one releasename!=1.4.1

Libraries that follow semantic version numbering promise to confine breaking changes to major releases, so ~= is the safer pin for them.

One thing trips people up. ~=1 is invalid. PEP 440 states that the compatible release operator must not be used with a single-segment version number such as ~=1.

Installing from Git or a local path

pip reads Git sources through the git+ URL prefix and needs a git executable on the path, according to its documentation.

Click the Advanced Package Install button on the right side of the search bar. Pick the version control option for a URL or the disk option for a local project folder.

Tags go on the end of the URL, like @v1.0. For a branch, append @ and the branch name. A commit works the same way with the full commit hash.

A Git repository install suits unreleased fixes and private forks. Use git+https or git+ssh, since pip discourages the plain git, git+git and git+http schemes.

The Editable (-e) checkbox links the project instead of copying it, and pip clones it to src inside the virtual environment by default. pip freeze records the commit of a Git install in both modes. An editable install appears as an -e line, and a regular install appears as a name @ git+URL@commit line.

Adding a custom repository

Private indexes need a repository entry. Click Options in the upper right corner of the Python Packages tool window and click Add, or go to Settings | Python | Package Repositories, then type the repository URL. For an index that needs HTTP authorization, select Basic HTTP and enter the credentials (JetBrains help).

In the terminal, the same job takes the --index-url flag followed by the repository address. The tool window way is add once and reuse for every search, while the terminal makes you pass the flag on each command.

How to Install All Libraries From requirements.txt or pyproject.toml

Open the file and use the prompt PyCharm shows. For requirements.txt, click Install requirements in the notification bar at the top of the editor. For pyproject.toml, put the caret on a highlighted dependency, press Alt+Enter and click Install package. For requirements.txt, PyCharm checks the file against the current interpreter when you open it or any Python file in the project (JetBrains help, 2026.2).

requirements.txt

From the terminal, run python -m pip install -r requirements.txt. The recommended file name is requirements.txt. Any other name, or several files in one project, has to be registered with PyCharm. An empty file in a project that already has imports triggers a quick-fix that fills it.

The file usually comes from pip freeze > requirements.txt, which pins every package installed in the environment, transitive ones included.

pip freeze records what is installed. It does not compute a lockfile or a solver result, according to the pip documentation.

Committing the file gives every machine the same library set, which supports environment parity between development and production.

pyproject.toml

Poetry Lock updates poetry.lock to match pyproject.toml, while Poetry Update installs or updates dependencies and then rewrites poetry.lock. On the uv side, uv Lock upgrades everything to the latest allowed versions and rewrites uv.lock, and uv Sync brings the environment in line with uv.lock.

When uv.lock falls out of sync, the Python Packages tool window offers an Update uv lock action.

Which file ends up recording your dependencies comes down to choosing between venv, conda and Poetry for the project.

How to Upgrade or Uninstall a Library

PyCharm marks outdated packages with an upgrade icon, and one click moves them to the latest version. Uninstalling uses the Uninstall package button next to the package name (JetBrains help, 2026.2).

To upgrade, click the icon in the Python Packages tool window. You can also select the package on the interpreter settings page, use Upgrade on the toolbar and click OK. In the terminal, python -m pip list --outdated shows what is behind, and python -m pip install --upgrade with the name upgrades one package.

Downgrading means picking a lower version from the version list, or running pip install with an == pin. The lower release replaces the installed one.

For uninstalling, use the button, or run python -m pip uninstall with the name.

Uninstalling a library leaves its dependencies installed, so an environment collects leftovers over time. To start clean, delete the whole virtual environment and rebuild it from the dependency file.

Upgrading changes the environment, not the file. Edit the pin in requirements.txt or pyproject.toml afterwards so the file matches what is installed.

Rerun the test suite after a major upgrade, because a full regression test run catches behavior changes that a changelog skips.

Why Does a Library Installation Fail in PyCharm?

Most failures come down to the wrong interpreter, a protected system Python, a pip lookup that finds no matching file, failed SSL verification, or an interpreter with no pip.

SymptomUsual causeFix
ModuleNotFoundError after installCode runs on a different interpreter than the one that received the installMatch the two interpreters
externally-managed-environmentSystem Python marked by PEP 668Switch to a venv interpreter
No matching distribution foundName typo, wrong Python version, no compatible wheelCheck name, Python and pip versions
CERTIFICATE\_VERIFY\_FAILEDProxy or certificate chain unknown to pipUpgrade pip, use system certificates
pip missingInterpreter ships without pipInstall pip into it

ModuleNotFoundError after a successful install

The package sits in one interpreter and the code runs in another. Compare the interpreter in the status bar with the one listed in the Python Packages tool window.

The embedded terminal adds a second variable. Settings | Tools | Terminal has an Activate virtualenv checkbox, and with it selected PyCharm activates the project’s virtual environment automatically (JetBrains help).

Externally managed environment

PEP 668 lets an operating system mark its Python as externally managed through an EXTERNALLY-MANAGED file in the standard library directory. pip then refuses to install, uninstall or upgrade there unless you work inside a virtual environment.

In PyCharm the error appears when the project interpreter is the system Python. Switch the project to a venv interpreter and it disappears.

The --break-system-packages flag overrides the check, but it risks overwriting files the OS package manager owns. I wouldn’t bother.

No matching distribution found

That short message hides a lot of different problems. A typo in the package name is the easy one. The harder ones are a release whose Requires-Python excludes the interpreter version, no wheel with a compatible platform tag, or an outdated pip.

pip’s issue tracker shows the identical message for an exact ipython pin on Python 3.6, where the release demanded a newer Python (issue 9615). The reporter of a separate issue (6526) traced it to a rejected platform tag instead.

In issue 9615, a pip maintainer explained that a precise message is hard to produce because distribution is file-based, so files of the same version can carry different Python requirements.

If the interpreter is too old for the release, change the Python version in PyCharm rather than pinning backwards. If pip is missing or outdated, install pip inside the interpreter first.

SSL certificate errors

pip verifies HTTPS certificates by default. Before pip 24.2 it ignored system certificates unless you opted in, and from 24.2 on Python 3.10 or later it uses them alongside certifi (pip documentation).

A typical symptom is “certificate verify failed: unable to get local issuer certificate”, common behind proxies with their own certificate chain.

Upgrade pip to 24.2 or later on Python 3.10 or newer. On pip 22.2 or later, add --use-feature=truststore. The other route is --cert with the corporate bundle, or setting PIP\_CERT.

On Python 3.9 or earlier only certifi is used, so proxies that re-sign traffic can still fail.

FAQ About Installing Libraries in PyCharm

Can you install several libraries at once?

Yes. Name them in one pip command in the Terminal tool window, for example python -m pip install numpy pandas matplotlib.

Listing them in requirements.txt and clicking Install requirements does the same job. Both routes install into the active interpreter.

How do you install NumPy or pandas in PyCharm?

Search for numpy or pandas in the Python Packages tool window and click Install, exactly as for any other library. The PyPI names are lowercase.

Installing pandas also installs NumPy, because pandas depends on it.

Where does PyCharm store installed libraries?

Libraries live in the site-packages folder of the interpreter they were installed into.

For a project venv, that folder sits inside the environment directory in the project. That means lib/python3.x/site-packages on macOS and Linux, and Lib\site-packages on Windows.

Is a library the same thing as a package?

Not strictly. A library is reusable code, while a package is the unit pip downloads from PyPI and installs.

In PyCharm the two words point to the same install step, and the search field takes the package name.

How can you see which libraries are already installed?

Open the Python Packages tool window and switch to the installed list, or open Settings | Python | Interpreter for the full table.

In the terminal, python -m pip list prints the same set for the active environment.

Can you install libraries in PyCharm Community?

Yes. Installation runs through pip, so the Terminal tool window and the interpreter settings page work in the free edition as well as in Professional.

Keeping Libraries in Sync Across Machines

Libraries installed through PyCharm stay in sync across machines when requirements.txt is regenerated after every install and committed with the code.

The order matters. Create the project venv interpreter first, then install and regenerate the file, then commit it and reinstall on a second machine.

Freezing before the venv exists records the system Python’s packages instead of the project’s. Skipping the reinstall on a second machine leaves the file untested.

pip freeze skips pip, setuptools, wheel and distribute on Python 3.11 and earlier but only pip on 3.12 and later, so a file frozen on the newer version can list packages the older one hides (pip documentation).

Exact pins buy reproducibility and cost automatic fixes, since every upgrade becomes a deliberate edit.

Pushing the file to a shared repository starts with connecting the project to GitHub from PyCharm. Verified against the PyCharm 2026.2 help pages, 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.