ModuleNotFoundError: No module named 'lecture'
Closed this issue · 7 comments
Hi,
I have just set up Jupyter on my local and while running the following piece of import statements, I am getting an error: ModuleNotFoundError: No module named 'lecture'. There is no error while running -> import pybryt.
Surprisingly, If I run the same import statement(from lecture import pybryt_reference) on the online Jupyter link mentioned in the readme of Github, I am getting the same error.
Any suggestions to resolve it would be helpful. Thanks!
HI @edsml-10f37f99, thank you for raising this issue. Have you maybe moved the notebook (.ipynb
) file or lecture.py
? Please note that lecture.py
must be in the same directory as the notebook you are running.
I rechecked that I haven't moved any files. I directly opened the Jupyter link in my browser as well and an error came up just after importing the statement. I tried recloning the repo as well on my local machine and found the same error.
When I checked inside my bin folder, I didn't find the lecture module either.
Thank you for the clarification. Could you please let me know what files you have in the directory where the notebook file is?
Could you try adding the following two lines before the import statement?
import sys
sys.path.append("./")
Exactly, as we said earlier, lecture.py
must be in the same directory as the notebook you are running. I am closing this issue now.