I have the following structure:
repo_folder |--> main.py |-->_init_.py |--> scripts (folder) |---> utils.py I want to import all the classes/functions in utils.py to main.py to do that I tried the following things:
1) from scripts.utils import * got an error that scripts module wasn't recognized.
2) moved main under scripts and edited the line from .utils import *
I use python 3.6.8 on Ubuntu 18.04 when trying (1) no errors marks shown over the IDE (Pycharm)
Thank you for helping!
__init__.pyfile to yourscriptsfolder as well. Then usefrom scripts import utils. Failing that, check yoursys.pathand working directories.