title: iPython Notebook (Python 3): ImportError: No module named
body: <p>First of all, I am really a python idiot, and this is my first python test.</p>
  
  <p>I am running a <code>test_predictors.ipynb</code> file using <a href="http://jupyter.readthedocs.io/en/latest/" rel="nofollow noreferrer">Jupyter</a>. I ran into an "ImportError: No module named" error when executing the <code>test_predictors.ipynb</code> file by block, like following:</p>
  
  <p><a href="https://i.stack.imgur.com/rrPlg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rrPlg.png" alt="enter image description here"></a></p>
  
  <p>The <code>decisioni_tree.py</code> is another .py file in the same folder as <code>test_predictors.ipynb</code>. <code>calculate_information_gain, decision_tree_train, decision_tree_predict</code> are all functions defined in <code>decisioni_tree.py</code>. The following picture is showing the file layout:</p>
  
  <p><a href="https://i.stack.imgur.com/WBAl8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WBAl8.png" alt="enter image description here"></a></p>
  
  <p>I searched a lot of threads, tried putting all .py files into a subfolder, or adding a leading dot in front of <code>decisioni_tree</code>, or adding full path to <code>decisioni_tree</code>, but none of these worked. </p>
  
  <p>I also read <a href="https://www.python.org/dev/peps/pep-0328/" rel="nofollow noreferrer">PEP</a>, but it does not make much sense to me. Now I am really clueless. I guess it was the path problem, but I don't figure out the logic behind how python arrange their path. I am wondering anyone can give some pointers? How should I solve this problem? Thanks.</p>
  
  <p>I am using Windows 10, with I think Python 3.4/3.5 installed. </p>