error: no module (own written python script)

I have written a module (a file `` file residing in the folder `my_module`).
Currently, I am working in the file `` that resides in the folder `cur_proj`. I have opened the folder in PyCharm using File – open (and I assume, hence, it is a PyCharm project?).

In the ProjectView (CMD-7) I can see my project `cur_proj` (in red) and under "External Libraries" I do see `my_module`. In, I can write
    `from my_module import my_mod as mm`
and PyCharm even makes suggestion for my_mod. So far so good.

However, when I try to run, PyCharm tells me
    `No module named my_module`

This seems strange to me, because
a) in the terminal (OS 10.10.2), in python, I can import the module no problem – there is a corresponding entry in the PYTHONPATH in .bashrc
b) in PyCharm – Settings – Project cur_proj – Project Interpreter – CogWheel next to python interpreter – more – show paths for selected interpreter icon, the paths from PYTHONPATH do appear (as I think they should

Hence, why do I get the error when I try to run  – What am I missing?

Please sign in to leave a comment.