This is guide for installing the pip packages from Python Console in Pycharm IDE.

Do not forget to run Pycharm as administrator if you are using windows OS before installing the packages.

First of all import the pacakage of pip in python console.

import pip

Installation of Package.

 pip.main(['install', '<package_name>'])

Examples
The below command will upgrade the version of package setuptools.

pip.main(['install','--upgrade','setuptools'])

The below command will install the scikit-learn and numpy packages.

pip.main(['install','numpy','scikit-learn'])

The below command will uninstall the scikit-learn package.

pip.main(['uninstall','scikit-learn'])

Answer from Zahid on Stack Overflow
🌐
TMS Outsource
tms-outsource.com › home › how to install pip in pycharm explained
How to Install Pip in PyCharm Explained
December 21, 2025 - 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).
Discussions

I tried to do a pip install in a Pycharm IDE it won't let me.
So it gave you an error. It tried to tell you what was wrong. Don't you think it would be useful to tell everyone else what the error is? More on reddit.com
🌐 r/learnpython
7
1
September 23, 2022
Installing python packages in Pycharm and cmd - Stack Overflow
I want to install a package in PyCharm and it cant be installed, so instead I install in the CMD in Windows with the same Python version that I set as interpreter in PyCharm. Now, when I want to im... More on stackoverflow.com
🌐 stackoverflow.com
What's best practice when using an IDE like PyCharm, pip install via terminal or use PyCharm's built in package installer. I'm experiencing some confusing behaviour when I compare the two methods.
Pycharm uses something called virtual environments by default. It creates a folder specific to the project, that has the modules installed there instead of the system python. That is considered good practice because different python projects tend to need different packages at different versions. If you have one script that needs requests version 1.3 and breaks if you run it with any other version, what are you going to do if another script needs version 1.4 and breaks with any other version? Python can't handle two different version packages with the same name, you don't have a way to select which one you want when you do "import requests". So virtual environments help with that, each project sees their own packages, but then to run it from outside you need to run the python inside the proper virtual environment, not the system python. https://realpython.com/python-virtual-environments-a-primer/ More on reddit.com
🌐 r/learnpython
10
5
January 6, 2023
Install PyCharm and pip - Python Help - Discussions on Python.org
Hi all. I’m getting ready to install PyCharm. I’ve been using vanilla python and IDLE for a while now and I kinda want to level up. If you’re in cmd line in WIN and you set the “pip config set global.require-virtualenv true”, does this mean you have to set this to false when using PyCharm? More on discuss.python.org
🌐 discuss.python.org
0
May 15, 2023
People also ask

How do I install multiple packages at once in PyCharm?
Use the terminal with pip: 'pip install numpy pandas matplotlib requests'. Alternatively, create a requirements.txt file and run 'pip install -r requirements.txt' to batch install all dependencies.
🌐
tms-outsource.com
tms-outsource.com › home › how to install packages in pycharm quickly
How to Install Packages in PyCharm Quickly
Can I install packages in PyCharm Community Edition?
Yes. Both PyCharm Community and Professional editions support package installation through the Python Packages tool window, Settings menu, and integrated terminal. The package management features are identical across both versions.
🌐
tms-outsource.com
tms-outsource.com › home › how to install packages in pycharm quickly
How to Install Packages in PyCharm Quickly
Why can't PyCharm find my installed package?
Your package likely installed to a different Python interpreter than your project uses. Check File &gt; Settings &gt; Python Interpreter to verify the correct environment is selected. Virtual environments often cause this confusion.
🌐
tms-outsource.com
tms-outsource.com › home › how to install packages in pycharm quickly
How to Install Packages in PyCharm Quickly
🌐
JetBrains
jetbrains.com › help › pycharm › installing-uninstalling-and-upgrading-packages.html
Install, uninstall, and upgrade packages | PyCharm Documentation
August 17, 2026 - PyCharm provides methods for installing, uninstalling, and upgrading Python packages for a particular Python interpreter. It means that each project has its own set of packages, which is considered a best practice for Python dependency management. By default, PyCharm uses pip to manage project packages.
🌐
YouTube
youtube.com › watch
How to Install pip in PyCharm | Step-by-Step Tutorial - YouTube
How to Install pip in PyCharm | Step-by-Step TutorialIn this quick tutorial, I’ll show you how to install pip, the Python package manager, right inside PyCha...
Published: April 20, 2025
🌐
YouTube
youtube.com › watch
Pycharm PIP Install | How to Install Python PIP Packages in Pycharm - YouTube
Let's get started. In this Pycharm PIP install video, we will learn how to identify the PIP version that PyCharm is currently running on as well as how to in...
Published: July 20, 2022
🌐
YouTube
youtube.com › watch
How to Install Pip packages using PyCharm ? | How to Install Python PIP Packages in PyCharm - YouTube
#kkjavatutorials #pycharm #pythonAbout this Video:This video talks about How to Install Pip packages using PyCharm ? Follow me on Social network:Facebook: ht...
Published: January 25, 2021
Find elsewhere
🌐
TMS Outsource
tms-outsource.com › home › how to install packages in pycharm quickly
How to Install Packages in PyCharm Quickly
June 22, 2026 - The integrated terminal runs pip commands directly within PyCharm, giving you the same control as a standalone command line while staying inside the IDE.
🌐
JetBrains
jetbrains.com › help › pycharm › package-installation-issues.html
Package installation issues | PyCharm Documentation
November 28, 2025 - Open the system terminal (not the PyCharm's built-in one) and run the following commands: . <venv path>/bin/activate pip install <package name>
🌐
YouTube
youtube.com › programmingknowledge2
How to Install Python PIP Packages On PyCharm - YouTube
### How to Install Python PIP Packages On PyCharmInstalling Python packages in PyCharm is straightforward, thanks to its built-in package management system. ...
Published: July 2, 2024
Views: 2K
🌐
Reddit
reddit.com › r/learnpython › what's best practice when using an ide like pycharm, pip install via terminal or use pycharm's built in package installer. i'm experiencing some confusing behaviour when i compare the two methods.
r/learnpython on Reddit: What's best practice when using an IDE like PyCharm, pip install via terminal or use PyCharm's built in package installer. I'm experiencing some confusing behaviour when I compare the two methods.
January 6, 2023 -

I pip installed from CMD a python package "pip install example" and it installs to "site-packages" folder where python 3.11 is installed to.

That works and my code in pycharm runs.

Then I uninstalled in cmd using command "pip uninstall example" and reinstalled the package from within pycharm's package installer window (hit the + button, search package click install). First thing I noticed is I can't find where the package was installed to in my computer.

After that if I click run, everything works, but I can no longer run that script from the terminal as it says the package is not installed.

From now on then, should I completely ignore pycharm package install functionality and just install packages via pip from the terminal either in pycharm or CMD? Is this the done thing?

Edit: After deleting my test project to see if the below works, it doesn't! My new pycharm test project is pointing at my python install, where example package is still installed, but clicking the run button (or shift f10) yields the "no module named 'example' error. But it will run from the terminal. Please help!

I'm thinking that if I pip install via the terminal from now on, those packages will always be available so long as I point pycharm to where python is installed on my computer when creating a new project.

Thanks for reading, any advice here would be greatly appreciated.

Top answer
1 of 3
5
Pycharm uses something called virtual environments by default. It creates a folder specific to the project, that has the modules installed there instead of the system python. That is considered good practice because different python projects tend to need different packages at different versions. If you have one script that needs requests version 1.3 and breaks if you run it with any other version, what are you going to do if another script needs version 1.4 and breaks with any other version? Python can't handle two different version packages with the same name, you don't have a way to select which one you want when you do "import requests". So virtual environments help with that, each project sees their own packages, but then to run it from outside you need to run the python inside the proper virtual environment, not the system python. https://realpython.com/python-virtual-environments-a-primer/
2 of 3
2
PyCharm typically uses a virtual environment, which means you're using a totally separate Python interpreter from your system installation when running tests in PyCharm. If you look in the lower right of the PyCharm window, there should be an indicator of which Python interpreter is currently being used. If you click on it, you'll get a drop down of interpreters available, and your system interpreter should be in that list. Personally, if I want to install a package to my system, I use pip from the command line. If I want it installed for use in a specific project, I use PyCharm. But you can configure it to work with some finagling.
🌐
Python.org
discuss.python.org › python help
Install PyCharm and pip - Python Help - Discussions on Python.org
May 15, 2023 - Hi all. I’m getting ready to install PyCharm. I’ve been using vanilla python and IDLE for a while now and I kinda want to level up. If you’re in cmd line in WIN and you set the “pip config set global.require-virtualenv …
🌐
YouTube
youtube.com › koolac
How to install Modules in PyCharm Terminal - YouTube
📌 Tutorial on how to install modules in PyCharm with Terminal. In this video, we install numpy package (module), matplotlib package (module), pandas package...
Published: January 17, 2022
Views: 12K
🌐
JetBrains
jetbrains.com › help › pycharm › pipenv.html
Configure a pipenv environment | PyCharm Documentation
August 17, 2026 - To use pipenv with PyCharm, you need to implement several preparation steps. Run the following command to ensure you have pip installed in your system:
🌐
Reddit
reddit.com › r/learnpython › can't install package to pycharm but can pip install it?
Can't install package to PyCharm but can pip install it? : r/learnpython
December 31, 2019 - You are most likely using a virtual environment. Virtual environments don’t have access to globally installed libraries. Run the same pip install command in the Pycharm terminal to install it in your virtual environment.
🌐
JetBrains
jetbrains.com › guide › python › tutorials › getting-started-pycharm › installing-and-managing-python-packages
Installing and Managing Python Packages - JetBrains Guide
March 30, 2023 - You don't need to install it using the command line. You can also select a specific version to install if you need to. If you now check your list of installed packages, requests is there, ready to be imported and used in our scripts.
🌐
Quora
quora.com › What-is-the-command-to-install-a-package-in-PyCharm-like-Jupyter-Notebooks-has-Pip-install-numpy
What is the command to install a package in PyCharm like Jupyter Notebooks has “! Pip install numpy”? - Quora
1. 1 type ‘pip install numpy’ into the terminal within Pycharm - not the python console 2. 2 you can do an ‘import numpy’ in your python code, and when python does the red squggle under that line it will prompt you to install and import 3. 3 if you are using setupto...
🌐
Quora
quora.com › How-do-I-install-a-package-using-a-command-line-in-PyCharm-Venv-Windows
How to install a package using a command line in PyCharm Venv Windows - Quora
Quora is a place to gain and share knowledge. It's a platform to ask questions and connect with people who contribute unique insights and quality answers.