Im quite new to python packages. I'm currently programming in Python 3+ I have a project structure with different small files in a folder called 'Libraries' and 1 python file called Main.py.
My project structure: Project structure
I have the following import structure:
#Main.py
from Libraries.ATV320 import ATV320
x = ATV320()
.....
#ATV320.py
from ModbusSerial import SerialClient
class ATV320:
......
#ModbusSerial.py
import time
class SerialClient:
......
If I run SerialClient.py i get no errors, if i run ATV320.py I get no errors. When running main.py i get following error:
File "c:\Users\public\Documents\GitHub\Project\Main.py", line 2, in <module>
from Libraries.ATV320 import ATV320
File "c:\Users\public\Documents\GitHub\Project\Libraries\ATV320.py", line 1, in <module>
from ModbusSerial import SerialClient
ModuleNotFoundError: No module named 'ModbusSerial'
Anyone know what I am doing wrong? Since the two library files work fine when executed... When i run main.py its suddenly throws an import error?