Polyenv allows you to run any programming language.
$ pip3 install polyenv
$ polyenv language path_to_file
Calling Python 3:
$ polyenv python3 ~/Desktop/example.py
"Hello, from Python"
Calling Ruby:
$ polyenv ruby ~/Desktop/example.rb
"Hello, from Ruby"
If you come across the following error:
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:777)
Just run:
$ /Applications/Python\ 3.6/Install\ Certificates.command