There are three additional tools you'll need to install prior to installing the EMSDK:
- Xcode
- Xcode Command Line Tools
- CMake
You can install Xcode from the macOS App Store. If you already had Xcode installed, you can check if the Command Line Tools are installed by going to Xcode | Preferences | Locations and checking if the Command Line Tools option has a value. The Command Line Tools should have already been installed if you installed the Homebrew package manager:
If you don't see that, open up Terminal and run this command:
xcode-select --install
Once complete, you can install CMake by running this command:
brew install cmake
Prior to installing Python, run this command:
python --version
If you see Python 2.7.xx (where xx is the patch version and can be any number), you're ready to install the EMSDK. If you get an error saying the Python command wasn't found or you see Python 3.x.xx, I recommend you install pyenv, a Python Version manager. To install pyenv, run this command:
brew install pyenv
You'll need to take some additional configuration steps to finalize the installation. Follow the installation instructions for Homebrew at https://github.com/pyenv/pyenv#homebrew-on-mac-os-x. After installing and configuring pyenv, run this command to install Python 2.7:
pyenv install 2.7.15
After the installation is complete, run this command:
pyenv global 2.7.15
To ensure you're using the correct version of Python, run this command:
python --version
You should see Python 2.7.xx, where xx is the patch version (I was seeing 2.7.10, which will work fine).