PyCharm unresolved reference when importing class from other file
If you are using python version 3 try this
from .pack import myclass
This worked for me
If MyClass
is defined in pack/file.py
, you need to import it as:
from pack.file import MyClass
Note that using names of Python built-in types (such as file
) for your own modules is a bad idea.