skip to Main Content

Visual Studio Code – How do I properly use relative import in python to execute modules

I have the following file structure: . β”œβ”€β”€ main.py └── modules β”œβ”€β”€ __init__.py β”œβ”€β”€ package1 β”‚ β”œβ”€β”€ __init__.py β”‚ β”œβ”€β”€ module1.py β”‚ β”œβ”€β”€ module2.py β”‚ └── __pycache__ β”‚ β”œβ”€β”€ __init__.cpython-310.pyc β”‚ └── module1.cpython-310.pyc β”œβ”€β”€ package2 β”‚ β”œβ”€β”€ __init__.py β”‚ β”œβ”€β”€…

VIEW QUESTION
Back To Top
Search