Reputation: 1
I'm currently new to python and I'm using micro python. I'm trying to use my custom module however, python can't seem to find it. The file is in the same directory. I've attached 2 images with the code. I don't see why it might not work.
Upvotes: 0
Views: 704
Reputation: 41
Did you initialise your code as a package (e.g., have an __init__.py
file in the same directory)?
If so you might need to locally install it with a setup.py
file and the command pip install -e .
Upvotes: 0
Reputation: 321
Is controller.py
in the same folder as main.py
?
If controller.py
is in another folder where your main.py
is, you need to import it like this:
import the_folder_has_this_file.controller
Upvotes: 1