You can put the script in the index.html. Download a theme and unzip it in the theme folder. Modify the index.html. Or copy a index.html from the deployment/web into theme folder.
The HTMLSnippet widget does not support the src-attribute.
Edit: regular src can work, but in this case the javascript is surrounded with document.write which is not supported. Other weather widgets may work, but maybe better in a Mendix Widget.