In my case, using a pre-existing virtualenv did not work in the editor - all modules were marked as unresolved reference (running naturally works, as this is outside of the editor's config, just running an external process (not so easy for debugging)).
Turns out PyCharm did not add the site-packages directory... the fix is to manually add it.

On Pycharm professional 2022.3

Open File -> Settings -> Python Interpreter, open the drop-down and pick "Show All..." (to edit the config) (1), right click your interpreter (2), click "Show Interpreter Paths" (3).

In that screen, manually add the "site-packages" directory of the virtual environment [looks like .../venv/lib/python3.8/site-packages (4) (I've added the "Lib" also, for a good measure); once done and saved, they will turn up in the interpreter paths.

The other thing that won't hurt to do is select "Associate this virtual environment with the current project", in the interpreter's edit box.

Answer from Todor Minakov on Stack Overflow
Discussions

python - PyCharm does not recognize modules installed in development mode - Stack Overflow
This question and answer is only about PyCharm failing to recognise installed packages. 2017-06-01T06:12:12.92Z+00:00 ... I had a devil of a time getting PyCharm to recognize a class in a module that I had just written. The problem is that PyCharm seems to default to not importing module class ... More on stackoverflow.com
🌐 stackoverflow.com
python - PyCharm does not recognize installed package - Stack Overflow
I am trying to include a package for which i installed using the cmd window and pip. It installed successfully however when i go to use it in Pycharm it returns an error saying the package is not More on stackoverflow.com
🌐 stackoverflow.com
python - Pycharm does not detect installed installed packages - Stack Overflow
I got a fresh installation of Python 3.6.6 and PyCharm 2018.2 Commmunity Edition. Unfortunately PyCharm (and also a installed with Python IDLE) does not see packages installed with pip. I’ve inst... More on stackoverflow.com
🌐 stackoverflow.com
PyCharm not "detecting" modules... possible pip issue?

In PyCharm's settings, you can configure the directories it looks in for installed modules. Maybe it's just looking in the wrong place? The option's rather hidden behind buttons with no name, so it's hard to describe, but this screenshot should give you an idea where to look:

http://imgur.com/PPqxBmE

More on reddit.com
🌐 r/Python
12
3
January 25, 2016
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360008168000-PyCharm-doesn-t-recognize-installed-modules
PyCharm doesn't recognize installed modules – IDEs Support (IntelliJ Platform) | JetBrains
I found out, that `__init__.py` file were not shown as python files in project tree. The issue was that `__init__.py` was included in Settings --> File Types --> "File type auto-detected by file content". Removing it from there solved the issue ... I have installed a package editable with 'pip install -e .' and even when the script ran correctly, the editor didn't sometimes (emphasis in sometimes) didn't recognize the package.
🌐
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>
🌐
JetBrains
youtrack.jetbrains.com › issue › PY-55617 › Pycharm-doesnt-recognize-any-of-my-installed-packages-on-a-remote-host
Pycharm doesn't recognize any of my installed packages on a remote host : PY-55617
The only thing that works to get the interpreter to recognize remote packages is to rollback to 2022.1.4. ... I am having exactly the same issue, I upgraded to 2022.2.1 yesterday and already tried all the proposal solutions mentioned here, I installed pycharm with the toolbox. ... Edit: Can confirm that the issue is not present on 2022.1.4 as @Paul Watts mentioned.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360000020759-PyCharm-CE-not-recognizing-installed-packages
PyCharm CE not recognizing installed packages – IDEs Support (IntelliJ Platform) | JetBrains
June 13, 2018 - You either have to activate virtualenv before installing packages with · source /Users/daviddevon/section10/venv/bin/activate · or select anaconda3 as a project interpreter in PyCharm settings.
Find elsewhere
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › articles › 360010202240-PyCharm-can-t-install-import-a-package-library-module
PyCharm can't install/import a package/library/module – IDEs Support (IntelliJ Platform) | JetBrains
February 5, 2020 - Note: Having installed something from the system terminal/cmd prompt doesn't always mean it will be available in PyCharm. Try installing/importing a package from the system terminal (outside of PyCharm) using the same interpreter/environment.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360001810940-PyCharm-does-not-recognize-installed-package
PyCharm does not recognize installed package – IDEs Support (IntelliJ Platform) | JetBrains
I think this is more of an issue with the specific package as I was unable to install the package by just calling its name in pip in the system terminal. I had to download the 32 bit version .whl and install that directly. And Pycharm does not allow you to pick specific files to install.
🌐
JetBrains
youtrack.jetbrains.com › issue › PY-57754 › PyCharm-2022.3-does-not-recognize-any-installed-packages-with-Targets-API-disabled
PyCharm 2022.3 does not recognize any installed ...
Our website uses some cookies and records your IP address for the purposes of accessibility, security, and managing your access to the telecommunication network. You can disable data collection and cookies by changing your browser settings, but it may affect how this website functions.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360009754920-PyCharm-stopped-recognizing-installed-packages-in-venv-
PyCharm stopped recognizing installed packages in venv? – IDEs Support (IntelliJ Platform) | JetBrains
September 21, 2020 - When that finished, my package list was still empty in the PyCharm interperter settings interface. I tried reinstalling a package from there, but it gave me a permissions error -- which has never happened before, but I suspect is probably owed to macOS Catalina. So I went to the terminal and installed a package via pip, e.g. ... which did not give me any errors. I went to look at the lib/site-packages directory to see why it still wasn't recognizing previously installed packages, it had changed from python3.7 to python3.8.
🌐
YouTube
youtube.com › watch
Pip installed packages not showing in Pycharm | Python packages in Pycharm | Fix - YouTube
Hi everyone!Hope it was helpful if so share this video to your friends.Thank you so much for watching..Peace.
Published: May 30, 2020
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 115000410510-PyCharm-won-t-recognize-installed-module
PyCharm won't recognize installed module – IDEs Support (IntelliJ Platform) | JetBrains
Could you please try a virtualenv with a name not starting with a digit? ... Solved! The error had to do with the fact that there are two redis modules available: redis and redis-py.
🌐
Stack Overflow
stackoverflow.com › questions › 51621593 › pycharm-does-not-detect-installed-installed-packages
python - Pycharm does not detect installed installed packages - Stack Overflow
It is possible that you are working on an env(may be venv) that pycharm is not able to see. In Pycharm you will have to go to Preferences->Project: -> and then install the package there.
🌐
Reddit
reddit.com › r/python › pycharm not "detecting" modules... possible pip issue?
r/Python on Reddit: PyCharm not "detecting" modules... possible pip issue?
January 25, 2016 -

So, I've installed xlsxwriter via pip just fine -- scripts run no problem. My issue is that I can't find where the actual files are installed to (because PyCharm IDE doesn't detect that xlsxwriter is actually installed and has that annoying red underline)

So, as you can see in the attached picture, when I run pip uninstall xlsxwriter it is showing that it's installed in \lib\site-packages\xlsxwriter\ but that folder simply does not exist as far as I can tell, not even as a hidden directory.

In the end, I really just want PyCharm to stop underlining modules that are installed, but this appears to be the case with a few different modules and I just want to get to the bottom of it.

http://imgur.com/DCAMRSJ

http://imgur.com/jbxAecT

🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 7122004478738-How-to-force-pycharm-recognize-the-packages-installed-in-my-python-environment-
How to force pycharm recognize the packages installed in my python environment? – IDEs Support (IntelliJ Platform) | JetBrains
August 12, 2022 - I've also: - uninstalled pycharm and re-installed it - updated pycharm · I can also see the projects are in pip list: ``` (iit-term-synthesis) brandomiranda~ ❯ pip list Package Version Editable project location ----------------------- ------------ -------------------------------------------------------------- absl-py 1.2.0 aiofile 3.8.1 aiohttp 3.8.1 aiosignal 1.2.0 appnope 0.1.3 astroid 2.11.7 asttokens 2.0.7 async-timeout 4.0.2 attrs 22.1.0 backcall 0.2.0 cachetools 5.2.0 caio 0.9.7 certifi 2022.6.15 charset-normalizer 2.1.0 click 8.1.3 cycler 0.11.0 dataclasses-json 0.5.7 datasets 2.4.0
🌐
sqlpey
sqlpey.com › python › top-solutions-to-fix-pycharm-not-recognizing-installed-modules
Top Solutions to Fix PyCharm Not Recognizing Installed Modules
November 23, 2024 - When using a virtual environment, PyCharm sometimes fails to recognize installed modules, marking them as unresolved references. This typically occurs because the site-packages directory, which contains the installed modules, is not automatically included in the interpreter’s configuration.
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 360003017500-PyCharm-CE-Successfully-installed-packages-not-installing
PyCharm CE: 'Successfully' installed packages not installing – IDEs Support (IntelliJ Platform) | JetBrains
February 10, 2019 - No change to the package list, and package is not installed. ... Please try File | Invalidate Caches/Restart... . If doesn't help, run pip list for this interpreter to see if they are actually installed.