I'm running a Python project in Pycharm structured as shown in the image and I'm trying to perform the following import in embedder_cmd.py :
from Neural_PM.clustering.clustering_experiment import run_clustering
I currently get the following error:
ModuleNotFoundError: No module named 'Neural_PM'
I've tried the solutions proposed in the previous answers but nothing seems to work for me.
Printing os.environ['PYTHONPATH'] currently shows my project path:
C:\Users\Mark\PycharmProjects\pythonProject4
Try this

from ..clustering.clustering_experiment import run_clustering. The two dots before clustering is to get out runners folder as your import statement is in embedder_cmd.py.If that doesn't work and you get the "no known parent package" error, try without dots, like this
from clustering.clustering_experiment import run_clusteringand runpy -m <path to embedder_cmd.py>at the top level of your project in terminal.Something like this:
Now look the result: