I am running Python 3 via Anaconda on Windows 10. I am having trouble importing my own modules into Jupyter workbooks. E.g., if I try import fibo
for a module named 'fibo.py' I get the following error:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-4-4105c89a6fa8> in <module>()
----> 1 import fibo
ImportError: No module named 'fibo'
I have tried three things: 1) using sys.path.append("path\to\fibo_folder") 2) Changing the PATH and PYTHONPATH environment variables to include "path\to\fibo_folder" 3. Navigating the Jupyter Notebook to the same directory as 'fibo' is installed in.
Note that I have also included an empty .py file in the same directory as fibo called 'init.py'
Only 3) seems to work, but this is impractical if I am using modules stored in different folders (they need to be kept separate). I am sure 1) and 2) should work, but they don't seem to.
How may I import my own modules into Jupyter?