Install Amazon ParallelCluster on macOS - Amazon ParallelCluster
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Install Amazon ParallelCluster on macOS

Prerequisites

  • Python 3 version 3.7+ or Python 2 version 2.7

Check your Python installation.

$ python --version

If your computer doesn't already have Python installed, or if you want to install a different version of Python, follow the procedure in Install Amazon ParallelCluster on Linux.

Install Amazon ParallelCluster on macOS using pip

You can also use pip directly to install Amazon ParallelCluster. If you don't have pip, follow the instructions in the main installation topic. Run pip3 --version to see if your version of macOS already includes Python and pip3.

$ pip3 --version
To install Amazon ParallelCluster on macOS
  1. Download and install the latest version of Python from the downloads page of Python.org.

  2. Download and run the pip3 installation script provided by the Python Packaging Authority.

    $ curl -O https://bootstrap.pypa.io/get-pip.py $ python3 get-pip.py --user
  3. Use your newly installed pip3 to install Amazon ParallelCluster. We recommend that if you use Python version 3+, you use the pip3 command.

    $ python3 -m pip install "aws-parallelcluster<3.0" --upgrade --user
  4. Verify that Amazon ParallelCluster is installed correctly.

    $ pcluster version 2.11.9

    If the program isn't found, add it to your command line path.

To upgrade to the latest version, run the installation command again.

$ pip3 install "aws-parallelcluster<3.0" --upgrade --user

Add the Amazon ParallelCluster executable to your command line path

After installing with pip, you might need to add the pcluster program to your operating system's PATH environment variable. The location of the program depends on where Python is installed.

Example Amazon ParallelCluster install location - macOS with Python 3.6 and pip (user mode)
~/Library/Python/3.6/bin

Substitute the version of Python that you have for the version in the preceding example.

If you don't know where Python is installed, run which python.

$ which python3 /usr/local/bin/python3

The output might be the path to a symlink, not the path to the actual program. Run ls -al to see where it points.

$ ls -al /usr/local/bin/python3 lrwxr-xr-x 1 username admin 36 Mar 12 12:47 /usr/local/bin/python3 -> ../Cellar/python/3.6.8/bin/python3

pip installs programs in the same folder that contains the Python application. Add this folder to your PATH variable.

To modify your PATH variable (Linux, OS X, or Unix)
  1. Find your shell's profile script in your user folder. If you're not sure which shell you have, run echo $SHELL.

    $ ls -a ~ . .. .bash_logout .bash_profile .bashrc Desktop Documents Downloads
    • Bash.bash_profile, .profile, or .bash_login

    • Zsh.zshrc

    • Tcsh.tcshrc, .cshrc, or .login

  2. Add an export command to your profile script.

    export PATH=~/.local/bin:$PATH

    This command adds a path, ~/.local/bin in this example, to the current PATH variable.

  3. Load the profile into your current session.

    $ source ~/.bash_profile