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
🌐
JetBrains
jetbrains.com › help › pycharm › installing-uninstalling-and-upgrading-packages.html
Install, uninstall, and upgrade packages | PyCharm Documentation
August 17, 2026 - Choose the version from the list of available versions and click Install. You can use the pip install command-line options during the installation:
🌐
TMS Outsource
tms-outsource.com › home › how to install pip in pycharm explained
How to Install Pip in PyCharm Explained
December 21, 2025 - To check, opening the Terminal tool window in PyCharm is the first move (View | Tool Windows | Terminal, or Alt+F12). Then run this: ... A working install prints the pip version and the path to the pip package inside site-packages, followed by the Python version in parentheses.
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
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
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
Why do I have to install python packages in pycharm that I have already pip installed?
You don't. You just have to configure PyCharm to use the correct interpreter that you've already installed the packages for (File -> Settings -> Project -> Project Interpreter). More on reddit.com
🌐 r/learnpython
15
1
July 31, 2020
People also ask

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
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
🌐
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
🌐
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
🌐
TMS Outsource
tms-outsource.com › home › how to install packages in pycharm quickly
How to Install Packages in PyCharm Quickly
June 22, 2026 - Use pip install --upgrade package-name in the terminal. Or open the Python Packages window, select the package, and click the upgrade arrow next to the version number. Learning how to install packages in PyCharm takes minutes but saves hours ...
🌐
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
Find elsewhere
🌐
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
🌐
YouTube
youtube.com › watch
How to Install Python PIP Packages in PyCharm - YouTube
In this Python video I am going to show you How to Install Pip packages using PyCharm or How to use PyCharm for installing and managing Pip and PyPI (Python...
Published: October 22, 2018
🌐
YouTube
youtube.com › watch
Installing and managing Python packages in PyCharm | Getting started - YouTube
This is the Getting Started Series, with Paul Everitt.In this episode, you will learn how to create install and manage Python packages in PyCharm.0:00 - Intr...
Published: April 5, 2022
🌐
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...
🌐
JetBrains
jetbrains.com › guide › python › tutorials › getting-started-pycharm › installing-and-managing-python-packages
Installing and Managing Python Packages - JetBrains Guide
March 30, 2023 - It’s important to mention that these packages belong to the current virtual environment that PyCharm also created for this project. In this case, a virtual environment in this project directory, based on Python 3.12. You can see this information by clicking on the Status Bar. You can also browse and install PyPi packages such as requests; a very popular Python package.
🌐
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 - 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?
🌐
JetBrains
jetbrains.com › help › pycharm › pipenv.html
Configure a pipenv environment | PyCharm Documentation
August 17, 2026 - If no pip is discovered, install it as described in the Installation Instructions. Alternatively, you can download and install Python from http://python.org. ... For your convenience, you might add the user base’s binary directory to your PATH environmental variable. If you skip this procedure, PyCharm will prompt you to specify the path to the pipenv executable when adding a pipenv environment.
🌐
YouTube
youtube.com › programmingknowledge2
How To Install Python Libraries In PyCharm - YouTube
In this tutorial, you will learn how to install Python libraries in PyCharm, a powerful integrated development environment (IDE) for Python development. Pyth...
Published: July 22, 2023
Views: 51K
🌐
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
🌐
Reddit
reddit.com › r/learnpython › why do i have to install python packages in pycharm that i have already pip installed?
r/learnpython on Reddit: Why do I have to install python packages in pycharm that I have already pip installed?
July 31, 2020 -

I’ve been learning data science with python for about a year now exclusively using google colab and Jupyter notebooks. I love how convenient they are. However, I want to try and make a streamlit data app and an IDE is needed. I decided to install pycharm, but it seems like I have to install every package (pandas, numpy, scikit, and the viz packages) into a project interpreter before I can start coding in a new .py file even tho I have already pip installed them on my machine. This seems incredibly counterintuitive. If I’ve already pip installed these packages, why can’t I just start coding away with import *package* as *alias* like in a notebook and I’m set?