Apple has tightened up the Gatekeeper security in its latest operating system and one very visible change is that the option to allow apps from unidentified developers is no longer there.
To lower the Gatekeeper policy on macOS Sierra and unlock programs you might have to completely disable the checks.
So to do that open your terminal and type:
sudo spctl --master-disable
To verify that your operation was successful you need to Open Settings and verify that the Anywhere option is now visible as shown below.
To undo the modification to default, enter the following command (notice two dashes before ‘master’).
sudo spctl --master-enable
And that would be all, your programs should run smoothly without the warning.
Be aware that this is a modification on the security policy that Apple recommends.
With that in mind, if you’re unsure whether you need or not don’t run any command.