How to execute Python3 code located remotely - e.g. github?
script_url = "https://gist.githubusercontent.com/geotheory/c874b88e712006802114a50d08c15c46/raw/1f218c0f4aa26b0596d9ef3b67005f7d4a9c8e99/python-test.py" exec(open(script_url).read()) FileNotFoundError: [Errno 2] No such file or directory: 'https://gist.githubusercontent.com/geotheory/c874b88e712006802114a50d08c15c46/raw/1f218c0f4aa26b0596d9ef3b67005f7d4a9c8e99/python-test.py' If there's a question already on this I'll happily delete this one, but I've not found anything.
openonly applies to files that exists on your system's filesystem. The easiest way is to download the file and then execute it within Python.import urllib.requestthenexec(urllib.request.urlopen(script_url).read())script_urlis not a valid filesystem path, it will give that error.