I found a lot of similar questions, but no one gave any answer. Still doesn't work.
My current structure:
Project:
- exp:
-- main.py
- mypac:
- internal:
-- __init__.py
-- next_mod.py
-- __init__.py
-- file.py
../Project/mypac/__init__.py:
from .internal.next_mod import print_smth
../Project/mypac/internal/next_mod.py:
def print_smth():
print(f'{__name__} from another module')
../Project/exp/main.py:
from mypac import print_smth
print_smth()
I tried lot of different approaches, but nothing prevent from error:
ModuleNotFoundError: No module named 'mypac'
sys.path.append('../mypac')
- not workingsys.path.abspath + dir + __file__
- not working- VS code JSON launch
PYTHONPATH
config - not working
and the rest i found at SOF.
Can anyone help me to figure out what the mistake?