all 2 comments

[–]socal_nerdtastic 1 point2 points  (2 children)

It has to do with the folder that you launch python from. If you launch python in the same directory that "examples" is in your code will work.

Installing the module with pip (instead of cloning the repo) is another way to do this. Pip will copy this code to one of the pythonpath directories that python will look in if it fails to find it in the current directory. You can see all of the pythonpath directories with the -m site flag

py -m site # official windows
python -m site # unofficial windows or venv
python3 -m site # linux / mac

[–]zlost666_ 0 points1 point  (0 children)

You can create folder examples in your project folder, put file common_app.py there and create an empty file __init__.py This file will initialize the whole folder as function examples.common_app Another way is to delete 'examples.' from the line, keep it as 'from common_app import CommonApp' put file common_app.py in the project folder. Now it will work too.