After installing with pip, you might need to add the pcluster executable to your operating system's PATH environment variable.
To verify the folder in which pip installed AWS ParallelCluster, run the following command.
$ which pcluster
/home/username/.local/bin/pcluster
If you omitted the --user switch when you installed AWS ParallelCluster, the executable might be in the bin folder of your Python installation. If you don't know where Python is installed, run this command.
$ which python /usr/local/bin/python
Note that the output might be the path to a symlink, not to the actual executable. To see where the symlink points, run ls -al.
$ ls -al $(which python)
/usr/local/bin/python -> ~/.local/Python/3.6/bin/python3.6
If this is the same folder that you added to the path in step 3 in Installing AWS ParallelCluster (p. 183), you're done with the installation. Otherwise, you must perform steps 3a – 3c again, adding this additional folder to the path.
Installing Python on Linux
If your distribution didn't come with Python, or came with an earlier version, install Python before installing pip and AWS ParallelCluster.
To install Python 3 on Linux
1. Check to see if Python is already installed.
$ python3 --version
or
Installing AWS ParallelCluster
$ python --version
NoteIf your Linux distribution came with Python, you might need to install the Python developer package. The developer package includes the headers and libraries that are required to compile extensions and to install AWS ParallelCluster. Use your package manager to install the developer package. It is typically named python-dev or python-devel.
2. If Python 2.7 or later is not installed, install Python with your distribution's package manager. The command and package name varies:
• On Debian derivatives such as Ubuntu, use apt.
$ sudo apt-get install python3
• On Red Hat and derivatives, use yum.
$ sudo yum install python3
• On SUSE and derivatives, use zypper.
$ sudo zypper install python3
3. To verify that Python installed correctly, open a command prompt or shell and run the following command.
$ python3 --version Python 3.8.11
Install AWS ParallelCluster on macOS
Sections
• Prerequisites (p. 189)
• Install AWS ParallelCluster on macOS using pip (p. 189)
• Add the AWS ParallelCluster executable to your command line path (p. 190)
Prerequisites
• Python 3 version 3.6+ 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 AWS ParallelCluster on Linux (p. 186).
Install AWS ParallelCluster on macOS using pip
You can also use pip directly to install AWS ParallelCluster. If you don't have pip, follow the instructions in the main installation topic (p. 183). Run pip3 --version to see if your version of macOS already includes Python and pip3.
Installing AWS ParallelCluster
$ pip3 --version
To install AWS 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 AWS 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 AWS ParallelCluster is installed correctly.
$ pcluster version 2.11.5
If the program isn't found, add it to your command line path (p. 190).
To upgrade to the latest version, run the installation command again.
$ pip3 install "aws-parallelcluster<3.0" --upgrade --user
Add the AWS 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 AWS 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.
Installing AWS ParallelCluster
To modify your PATH variable (Linux, macOS, 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
Install AWS ParallelCluster on Windows
You can install AWS ParallelCluster on Windows by using pip, which is a package manager for Python. If you already have pip, follow the instructions in the main installation topic (p. 183).
Sections
• Install AWS ParallelCluster using Python and pip on Windows (p. 191)
• Add the AWS ParallelCluster executable to your command line path (p. 192)
Install AWS ParallelCluster using Python and pip on Windows
The Python Software Foundation provides installers for Windows that include pip.
To install Python and pip (Windows)
1. Download the Python Windows x86-64 installer from the downloads page of Python.org.
2. Run the installer.
3. Choose Add Python 3 to PATH.
4. Choose Install Now.
The installer installs Python in your user folder and adds its program folders to your user path.
To install AWS ParallelCluster with pip3 (Windows)
If you use Python version 3+, we recommend that you use the pip3 command.
1. Open the Command Prompt from the Start menu.
2. Use the following commands to verify that Python and pip are both installed correctly.
C:\>py --version Python 3.8.11 C:\>pip3 --version