Reputation: 161
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-c1d07d468637> in <module>
----> 1 import requests
2
ModuleNotFoundError: No module named 'requests'
Nothing worked so far. I appreciate any help
Jupyter error message:
Pip installed modules:
Upvotes: 1
Views: 325
Reputation: 85
Maybe you forgot to append the path to your modules to sys.path.
Example from within your notebook, if u want to import some selfwritten module from some relative location:
import sys
sys.path.append("../../../")
sys.path.append("../../")
# Rest of your code goes here, for example import $MODULE_NAME
Then you can import $MODULE_NAME
(so, use the proper modulename of your desired module) iff. that module is in ../../
or in ../../../
.
HTH. :-)
Upvotes: 1
Reputation: 69
I think you are installing your modules on a vitualenv and the Jupyter notebook is running outside the virtualenv.
This happened to me once.
Upvotes: 1