-1

In my project, the file structure is as follows:

root/folder1/folder2/script1.py

root/folder1/folder2/script2.py

I have a statement in script2.py that says "import script1", and Pycharm says no module is found. How do I fix this?

0

1 Answer 1

1

To import as object :

from root.folder1.folder2 import script1

To import a function of your script:

from root.folder1.folder2.script1 import NameOfTheFunction

2

Not the answer you're looking for? Browse other questions tagged or ask your own question.