If your own module is in the same path, you need mark the path as Sources Root. In the project explorer, right-click on the directory that you want import. Then select Mark Directory As and select Sources Root.

Answer from Beatriz Fonseca on Stack Overflow
๐ŸŒ
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
1. find the location of the working directory(pycharm---file---setting---project---project structure) 2. find the location of the downloaded module(type pip show {module name} in command prompt )
Discussions

python - PyCharm doesn't recognize installed module - Stack Overflow
Pycharm is unable to recognize installed local modules, since python interpreter selected is wrong. It should be the one, where your pip packages are installed i.e. More on stackoverflow.com
๐ŸŒ stackoverflow.com
"Module not found error" Pycharm Troubleshooting
Thanks I will do that!! More on reddit.com
๐ŸŒ r/learnpython
5
2
September 29, 2024
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
Can't import local modules in Pycharm
How are you launching the main script? What are the names of the files? More on reddit.com
๐ŸŒ r/learnpython
16
1
April 21, 2020
๐ŸŒ
JetBrains
intellij-support.jetbrains.com โ€บ hc โ€บ en-us โ€บ community โ€บ posts โ€บ 360009421519-PyCharm-reporting-it-can-t-find-module
PyCharm reporting it can't find module โ€“ IDEs Support (IntelliJ Platform) | JetBrains
July 30, 2020 - PyCharm seems to have trouble finding local modules. Python itself has no problem finding them and the program runs as expected. In views.py from lib.ome import func1, func2 I have the following d...
๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ "module not found error" pycharm troubleshooting
r/learnpython on Reddit: "Module not found error" Pycharm Troubleshooting
September 29, 2024 -

Hey everyone, I'm a beginner and could use some help. I installed a library, but Python isn't recognizing it. I've already tried using the pip install command in the terminal, but I still get the 'Module not found' error. What's weird is that other libraries like numpy and pandas work just fine. Does anyone know what could be wrong?

๐ŸŒ
JetBrains
intellij-support.jetbrains.com โ€บ hc โ€บ en-us โ€บ community โ€บ posts โ€บ 360000424900-Very-frustrated-PyCharm-says-local-import-is-unresolved-reference
Very frustrated--PyCharm says local import is unresolved reference โ€“ IDEs Support (IntelliJ Platform) | JetBrains
August 13, 2018 - I am still getting this issue ("No module named p01", in file p02.py). Are those files located in sub-directory (not project root)? If yes, please try marking this directory as Sources: https://www.jetbrains.com/help/pycharm/configuring-folders-within-a-content-root.html#mark
๐ŸŒ
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
Solved! The error had to do with the fact that there are two redis modules available: redis and redis-py. If you look at the screenshot above, the version of redis that PyCharm installed (3.2.0) is higher than the version that PyCharm has marked ...
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 - In case you are using a virtualenv/conda environment as your Project Interpreter in PyCharm, it is enough to activate that environment in the system terminal and then do the test. Example for virtualenv and conda environment: a) Go to File | Settings | Project: <project_name> | Project Interpreter (Preferences | Project: <project_name> | Project Interpreter for macOS) to find where your environment/interpreter is located;
๐ŸŒ
YouTube
youtube.com โ€บ meri (engel) kasprak - programming videos
Fixing the problem where PyCharm is not recognizing your custom import file - YouTube
This happens when you have your project organized in a folder structure, and you are not working at the top level. It is an easy fix, if you know what to fix.
Published: July 28, 2020
Views: 62K
๐ŸŒ
JetBrains
youtrack.jetbrains.com โ€บ issue โ€บ PY-42748 โ€บ PyCharm-doesnt-see-the-modules-to-import-in-the-same-directory
PyCharm doesn't see the modules to import in the same ...
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 โ€บ 115000058690-Module-not-found-in-PyCharm-but-externally-in-Python
Module not found in PyCharm but externally in Python โ€“ IDEs Support (IntelliJ Platform) | JetBrains
Python 2.7.10 (default, Jul 30 2016, 19:40:32) [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin import neuron Traceback (most recent call last): File "<input>", line 1, in <module> File "/Applications/PyCharm.app/Contents/helpers/pydev/_pydev_bundle/pydev_import_hook.py", line 21, in do_import module = self._system_import(name, *args, **kwargs) ImportError: No module named neuron
๐ŸŒ
DEV Community
dev.to โ€บ dmitryzub โ€บ debugging-pycharmintellij-idea-no-module-named-error-inside-virtual-environment-a7g
Debugging PyCharm/Intellij IDEA no module named error inside virtual environment - DEV Community
November 20, 2021 - The first Google results was exactly ... which said: Pycharm is unable to recognize installed local modules, since python interpreter selected is wrong....
๐ŸŒ
JetBrains
intellij-support.jetbrains.com โ€บ hc โ€บ en-us โ€บ community โ€บ posts โ€บ 360004264019-Pycharm-doesn-t-detect-suggest-modules-classes-or-functions-to-import-when-typing
Pycharm doesn't detect / suggest modules, classes, or functions to import when typing โ€“ IDEs Support (IntelliJ Platform) | JetBrains
June 29, 2019 - Blog post - https://blog.jetbrains.com/pycharm/2018/11/let-pycharm-do-your-import-janitorial-work/ TLDR; use ctrl+space+space to bring up autocomplete for non-imported symbols. ... Ctrl+Space+Space does help though it doesn't completely solve the issue: unimported symbols won't show up in the autocomplete suggestions list, even though Ctrl+Space+Space works (without any visual list to choose from though).
๐ŸŒ
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

๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ can't import local modules in pycharm
r/learnpython on Reddit: Can't import local modules in Pycharm
April 21, 2020 -

As the above suggests I'm trying to import a local module foo

It's just got a class inside it with a load of functions.

I've tried

import foo

and

from foo import *

and

import .foo 

and

from .foo import *

and

from sub_directory_name.foo import *

etc.

I've set various directors to sub directories. I've appended my system path to include these sub folders and nothing works, they all just error on import.

Thanks in advance for any help.

EDIT : I usually use VS Code for JS, but I set it up for Python and it all works. So VS code is fine with importing a local module, Pycharm is not.

Foiled by my IDE.

๐ŸŒ
Reddit
reddit.com โ€บ r/pythontips โ€บ pycharm gives me "modulenotfounderror" when ever i import a package and does not recognize all the built in functions
pycharm gives me "ModuleNotFoundError" when ever i import a package and does not recognize all the built in functions : r/pythontips
August 16, 2022 - First make sure you have a valid python installation, then create a venv using pycharm UI ๐Ÿ‘ my experience with pycharm is that it's superior in many cases over other ide's but it also takes more time to understand it ... I think you are installing the packages globally and are trying to access the packages from within the virtual environment. When you elect a python interpreter when starting your project, the virtual environment option is checked by default. I built Aquilia, a modular backend framework for Python.
๐ŸŒ
Reddit
reddit.com โ€บ r/pycharm โ€บ pycharm can't find modules from the system interpreter
r/pycharm on Reddit: PyCharm can't find modules from the system interpreter
February 21, 2021 -

Hello,

I want to use the system interpreter for my project because I need to use tkinter for matplotlib, but if I choose python3.8 as interpreter for my project I can't use modules I have installed globally (e.g. numpy or matplotlib).

However if I run my project in the terminal the modules are recognized and everything works fine.

I would love if someone either knows how to import tkinter in an virtual environment or how to configure the interpreter to use global packages.

Edit: I'm on Linux (Pop OS)

๐ŸŒ
JetBrains
intellij-support.jetbrains.com โ€บ hc โ€บ en-us โ€บ community โ€บ posts โ€บ 115000782850-How-to-set-up-working-directory-in-PyCharm-and-package-import-
How to set up working directory in PyCharm and package import? โ€“ IDEs Support (IntelliJ Platform) | JetBrains
December 18, 2017 - So, I specified the absolute path, It still doesn't work. Why? os.chdir("/Users/Branden/Desktop/Deep Learning") from lr_utils import load_dataset ยท If I ran the same code in another editor like Sublime Text, Spyder, or iPython, it works. Why PyCharm does not recognize the module?
๐ŸŒ
YouTube
youtube.com โ€บ watch
How to Fix PyCharm Import Error and Setup Your Interpreter - YouTube
This will show you how to fix common pycharm import errors when trying to import python modules. Please watch through the entire video as I cover many differ...
Published: June 25, 2019