"ImportError: No module named..." when importing my own module
<p>I am trying to import a module and I keep getting an ImportError.</p>

<p>In the PortfolioStatus.py file I have the following code which imports the share_data class from the share_data.py module
<br> <code>from Shares.share_data import share_data</code></p>

<p>I am getting the following error: </p>

<pre><code>File "/home/lucasamos/FYP/Shares/Communication/PortfolioStatus.py", line 3, in &lt;module&gt;
from Shares.share_data import share_data
ImportError: No module named Shares.share_data
</code></pre>

<p>To make things more confusing this works fine on my local machine but I am hosting on PythonAnywhere and this is where I am getting the error</p>

<p>My file hierarchy is show in the image below</p>

<p><a href="https://i.stack.imgur.com/NbAOp.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/NbAOp.jpg" alt="File hierarchy"></a></p>

<p>Thanks in advance!</p>