I have this folder structure:
--test
first.py
--numpad
second.py
third.py
in the first.py i have this line of code:
from numpad import second
and in the second.py file i have this:
import third
but in the test folder when i run
python first.py
i get this error message:
ModuleNotFoundError: No module named 'third'
note: i have also tried adding __init__.py to my numpad folder but it didnt work
import secondin second.py, or is that supposed to beimport third?numpadis supposed to be a python module. You can tell it that it is one by adding an empty__init__.pyfile into thenumpadfolder.__init__.pyin numpad folder but didnt work__init__.pystuff is python2. Next thing to try would be to do an explicitly local import forthird, i.e.from . import third. Since your interpreter runs at a level wherethirdis not visible, this might be necessary