I have the following module structure in my Administrator project folder
StockController.py (in the root project folder)
then in a package called Utilities I have the following two modules
- ExcelManipulator.py
- StockPurchaseInfo.py
Relevant Code from each module as as follows:
StockController.py
from Utilities.ExcelManipulator
import ExcelManipulatorClass
ExcelManipulator.py
from StockPurchaseInfo import StockInfoClass
class ExcelManipulatorClass:
StockPurchaseInfo.py
class StockInfoClass:
When running the StockController module I get the following error
Traceback (most recent call last):
File "d:AdministratorStockController.py", line 1, in <module>
from Utilities.ExcelManipulator import ExcelManipulatorClass
File "d:AdministratorUtilitiesExcelManipulator.py", line 2, in <module>
from StockPurchaseInfo import StockInfoClass
ModuleNotFoundError: No module named 'StockPurchaseInfo'
However when I run the ExcelManipulator.py module I dont get the error (it is able to find the StockPurchaseInfo module) why is this the case?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…