Have you tried creating a python package of the script? I believe at minimum you would require an empty "_init_" file and toml file. After creating the package, you should be able to run your script from any directory.