I have a simple module with this file structure:
main.py
/mypackage
__init__.py
dateclass.py
myfunctions.py
Here are the imports and relevant classes/functions of each file. I suspected a circular dependency, but don't see one.
main.py:
from mypackage.myfunctions import testfunction
dateclass.py:
#!/usr/bin/env python3
import datetime
class Date(object):
...
myfunctions.py:
#!/usr/bin/env python3
from dateclass import date
def testfunction():
print("You imported me!")
When I run "python3 main.py" it returns:
myfunctions.py", line 2, in <module>
from dateclass import Date
ImportError: No module named 'dateclass'
Am I missing something that's staring me in the face here? Much appreciate the help.