I have the following folder structure:
src
|_ __init__.py
example.py
test
|_ test.py
# __init__.py
class API:
def something(self):
print('folder src | file __init__')
# example.py
class Example:
def doingSomething(self):
print('folder src | file example')
# test.py
import src
from src.example import Example
class Test:
def somethingElse(self):
print('folder test | file test')
when I run the test.py
file, I get the following error:
Traceback (most recent call last):
File "<my path>\test\test.py", line 1, in <module>
import src
ModuleNotFoundError: No module named 'src'