File "C:\Users\sande\OneDrive\Desktop\two.py", line 8, in import score.py
ModuleNotFoundError: No module named 'score.py'; 'score' is not a package
File "C:\Users\sande\OneDrive\Desktop\two.py", line 8, in import score.py
ModuleNotFoundError: No module named 'score.py'; 'score' is not a package
You can solve this issue by using this:
import score
If this score.py
is not is not in same folder as your two.py
then visit How to import the class within the same directory or sub directory to solve that issue.
Don't use import scope.py, if you are having problem importing try import scope (if both the files are in the same directory) or if the files are in different directories you can use the sys module in python
# importing sys
import sys
# adding Folder_2 to the system path
sys.path.insert(0, '/C:/Users/sande/OneDrive/{drive/folder}/scope.py')
# importing the functions/class
If you are still getting the error, try removing
if name == "main":