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 - 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 ...
🌐
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
Discussions

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
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
python - Setting up PyCharm in Windows - Stack Overflow
But I got problems, setting this up on Windows 10. I downloaded the community-Version of PyCharm and installed it. I set up a new project with a virtual enviroment (default). But how to install packages? I tried "pip install pandas" in console, but it says that pip is unknown. 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
🌐
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
🌐
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
🌐
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.
Find elsewhere
🌐
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. In the Packages tool window you can type in requests and PyCharm will search the PyPi repository and return the most relevant packages that match your search.
🌐
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
🌐
Guru99
guru99.com › home › python › how to install python on windows [pycharm ide]
How to Install Python on Windows [Pycharm IDE]
3 weeks ago - PyCharm is a full-featured IDE with code completion, debugging, and project management, which makes it better suited for larger, professional Python development. 🛠️ Why should I add Python to PATH during installation? Adding Python to PATH lets you run python and pip commands from any folder in the Command Prompt. Without it, Windows may not recognize these commands, and you would need to type the full installation path each time.
🌐
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. For conda environments, you can use the conda package manager. In PyCharm, you can preview and manage packages in the Python Packages tool window and in the Python interpreter settings.
🌐
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
🌐
GeeksforGeeks
geeksforgeeks.org › how-to-install-python-pycharm-on-windows
How to install Python Pycharm on Windows? - GeeksforGeeks
October 11, 2023 - PIP stands for "Preferred Installer Program" or "Pip Installs Packages" and is a standard package manager for Python that enables users to install and manage additional libraries and dependencies not included in the standard Python library. To use PIP, you must install Python on your Windows machine
🌐
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 …
🌐
TMS Outsource
tms-outsource.com › home › how to install packages in pycharm quickly
How to Install Packages in PyCharm Quickly
June 22, 2026 - This method takes 4 steps versus 3 in the Package Tool Window. Choose this when you need to install from a requirements.txt file or custom repository. The integrated terminal runs pip commands directly within PyCharm, giving you the same control as a standalone command line while staying inside the IDE.
🌐
Eclipse Consulting
eclipse-online.com › home › python › installing python with pycharm
Installing Python with PyCharm • Eclipse Consulting
December 3, 2021 - The installed features include IDLE, pip, and the documentation. Installation will NOT be in your path. This means if you open the command prompt or Terminal and type Python, you will not the get Python interpreter you just installed. Instead the Windows Store will open and prompt you to install Python 3. More on this later. The Python interpreter installed by PyCharm ...
Address: 36414 Garfield Road, 48035, Clinton Township
🌐
JetBrains
jetbrains.com › help › pycharm › package-installation-issues.html
Package installation issues | PyCharm Documentation
November 28, 2025 - You might encounter a problem when installing a Python package in the project settings or in the Python Package tool window. Eventually, most of the issues are out of IDE control as PyCharm uses the pip package manager to perform the actual installation.
🌐
Stack Overflow
stackoverflow.com › questions › 59333989 › setting-up-pycharm-in-windows
python - Setting up PyCharm in Windows - Stack Overflow
Afterwards, within PyCharm go to File->Settings->Project and you'll find a PIP interface there that you can use for convenience setting up a venv with it...(During installation PyCharm should give you the option to add Python to Win10 Path, ...
🌐
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.