I'm using Python 3. I have two Python files in the same directory: first.py and second.py. In the beginning of first.py, I use:
from second import *
However, it returns the following error message:
ModuleNotFoundError: No module named 'second'
How should I import it in first.py?
Update: To clarify my specific use-case, I am trying to split my settings.py in Django. I have a main settings.py file and another one that only includes the confidential information. I followed this following documentation that uses the following line in settings.py:
from settings_local import *
Note that settings_local.py is in the same directory. However, it returns the following error message:
ModuleNotFoundError: No module named 'settings_local'
I know the document says "Some of the examples listed below need to be modified for compatibility with Django 1.4 and later." but I do not know how to use it in Python 3.