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
.
More Related Contents:
- Loading JSON file Using Python Utils Library
- PyCharm shows unresolved references error for valid code
- Pycharm and sys.argv arguments
- Why is Python running my module when I import it, and how do I stop it?
- How do I activate a virtualenv inside PyCharm’s terminal?
- Can’t import my own modules in Python
- Does Python have a package/module management system?
- How do I configure PyCharm to run py.test tests?
- Can’t load Python modules installed via pip from site-packages directory
- Use Conda environment in pycharm
- In Python, can I call the main() of an imported module?
- ImportError on python 3, worked fine on python 2.7
- Cannot find reference ‘xxx’ in __init__.py
- Discord Bot can only see itself and no other users in guild
- Process finished with exit code -1073740791 (0xC0000409) pycharm error
- Python: import module from another directory at the same level in project hierarchy
- Python importing a module from a parallel directory
- Python: Why should ‘from import *’ be prohibited?
- Delete unused packages from requirements file
- How do I extend a python module? Adding new functionality to the `python-twitter` package
- Can you define aliases for imported modules in Python?
- Python modules with identical names (i.e., reusing standard module names in packages)
- How to surround selected text in PyCharm like with Sublime Text
- PyCharm hangs on ‘scanning files to index’ background task
- PyCharm noinspection for whole file?
- Installing lxml, libxml2, libxslt on Windows 8.1
- How to type hint a dictionary with values of different types
- What is the type hint for a (any) python module?
- How to reference python package when filename contains a period
- Pycharm: run only part of my Python file