Allow applications downloaded from anywhere in macOS Sierra
Solution 1:
Apple have removed this function on macOS Sierra, but you can re-enable it running this in terminal:
sudo spctl --master-disable
Additionally, as Jack points out:
Granted this is a little overkill, but it does the job reliably. It can be re-enabled immediately after launching the application with
sudo spctl --master-enable
Solution 2:
OS X improves download validation by providing file quarantine in applications that download files from the Internet. This means that downloads are checked for safety (known malware) when you try to open them.
You can check an app (or any file) in quarantine using terminal. It's literally an extended file system attribute:
mac:~ user$ xattr /Applications/Some.app
com.apple.quarantine
mac:~ user$
If you're absolutely sure it's safe to run the app, you can drop the attribute like follows (you'll be asked to provide your password):
mac:~ user$ sudo xattr -r -d com.apple.quarantine /Applications/Some.app
Check once again:
mac:~ user$ xattr /Applications/Some.app
mac:~ user$
Now you should be able to run the app.