This is a variation of the many questions complaining that one can't import exotic external modules, even though the import works from the terminal.  The many answers suggest fixing the execute command in the Build screen. The difference here is that I can't import a module from my own machine, but that it works at both the terminal and Idle.  I suspect my problem is a PATH issue.  Geany seems like a very nice editor/IDE.  But if I can't import even my own modules, it's not very useful.

My simplified directory structure:

py - root for storing python MODULES (apps) and a module of user defined functions (included in PYTHONPATH)

----| main

         main.py

----| common (for storing functions accessible by multiple modules

         fun.py

The code:

main.py

from common import fun

fun.test()

fun.py

def test():

    print('testing')

Ouput from Idle

========================== RESTART: C:/py/test/main.py =========================
testing
>>>

Output from Geany


ModuleNotFoundError: No module named 'py'

Original exception was:
Traceback (most recent call last):
  File "test.py", line 1, in <module>
    from py.common import fun
ModuleNotFoundError: No module named 'py'