Reputation: 1
I'm trying to import a python script (called flask_router.py) from the same directory into another python script (import_requests.py) but am receiving the following ModuleNotFound error in both the terminal and VS Code.
I've tried troubleshooting with pip install as well as the sys module to append the path. Also confirmed the directory is found in the PYTHONPATH and that the correct version of python is in use (v3.10.9).
Feels like I've exhausted every option to this point. It seems so simple that I should be able to import a script that exists in the same folder, but clearly not. Does anyone have an idea?
Upvotes: 0
Views: 194
Reputation: 423
What you can do is create a package for it (personal) and turn it into a.whl
file
Upvotes: 1