title: Python: Module Not Found in Jupyter Notebook
body: <pre><code>.
  └── folder1
      └── folder2
          ├── first_model.py
          └── __init__.py
      └── folder3
          ├── model.py
          └── run.ipynb
  </code></pre>
  
  <p>I'm trying to import a module within my run.ipynb file.</p>
  
  <pre><code>from model import xyz
  </code></pre>
  
  <p>and within model.py I've run:</p>
  
  <pre><code>import folder1.folder2.first_model import abc
  </code></pre>
  
  <p>when I try to run the file on jupyter notebook I keep getting this error:</p>
  
  <pre><code>ModuleNotFoundError: No module named 'folder1'
  </code></pre>
  
  <p>How can I fix this problem? I've been able to import my module perfectly fine within my model.py file, but when I try to move the import into a jupyter notebook it fails. Also wanted to note that I am able to run the .ipynb file just fine in pycharm's managed jupyter server, but not after I run a localhost.</p>
  
  <p>Beginner in python, thanks!! </p>
  
  <p>UPDATE:
  I fixed it by including this at the top of my .ipynb</p>
  
  <pre><code>import sys
  sys.path.append('my/path/to/module/folder')
  
  </code></pre>
  
  <p>but I've definitely included the directory in my PYTHONPATH, anyone know why I still need to include that code in?</p>