I think I know why the sys.path insert() didn’t work. I forgot that the python package defines and loads all local modules in its package during it’s initialization in the init.py file. So the “UWG” variable in this case is already likely already attached to the scripts directory UWG right at the beginning, and changing the sys.path downstream won’t change that. I say “likely” because, I don’t know how GHPython initializes the python in it’s components, but I assume it’s working in a similar fashion.
So rather then printing your sys.path, print your globals(). globals() is a method in python that returns a dictionary of all the variables in your module. I believe in this case you should see that the ‘UWG’ key is attached the module path to your desktop UWG (or whatever the wrong path is).
Unfortunately I’m not sure how to fix this. Stackoverflow seems to suggest not start clearing or messing around with the globals() dictionary. Maybe you could just redefine the UWG key with the correct module path? Anyway, I hope this at least provides some more context on the problem, and I think posting on Stackoverflow would be the best way of resolving it.