macOS natively comes with Python 2.7. To install Python 3.4+, download the installation wizard and follow the instructions. Following is a screenshot of the wizard at the first step:
Some Python packages require Xcode command-line tools to compile properly. Xcode can be obtained from the Mac App Store. To install the command-line tools, enter the following command in the Terminal: xcode-select --install. Then follow the installation prompts.