Install Amazon ParallelCluster on Linux
You can install Amazon ParallelCluster and its dependencies on most Linux distributions by using pip, a
package manager for Python. First, determine if Python and pip are installed:
-
To determine if your version of Linux includes Python and
pip, runpip --version.$pip --versionIf you have
pipinstalled, go on to the Install Amazon ParallelCluster with pip topic. Otherwise, continue with Step 2. -
To determine if Python is installed, run
python --version.$python --versionIf you have Python 3 version 3.6+ or Python 2 version 2.7 installed, go on to the Install Amazon ParallelCluster with pip topic. Otherwise, install Python, and then return to this procedure to install
pip. -
Install
pipby using the script that the Python Packaging Authority provides. -
Use the
curlcommand to download the installation script.$curl -O https://bootstrap.pypa.io/get-pip.py -
Run the script with Python to download and install the latest version of
pipand other required support packages.$python get-pip.py --useror
$python3 get-pip.py --userWhen you include the
--userswitch, the script installspipto the path~/.local/bin. -
To verify that the folder that contains
pipis part of yourPATHvariable, do the following:-
Find your shell's profile script in your user folder. If you're not sure which shell you have, run
basename $SHELL.$ls -a ~. .. .bash_logout .bash_profile .bashrc Desktop Documents Downloads-
Bash –
.bash_profile,.profile, or.bash_login -
Zsh –
.zshrc -
Tcsh –
.tcshrc,.cshrcor.login
-
-
Add an export command at the end of your profile script that's similar to the following example.
export PATH=~/.local/bin:$PATHThe export command inserts the path, which is
~/.local/binin this example, at the front of the existingPATHvariable. -
To put these changes into effect, reload the profile into your current session.
$source ~/.bash_profile
-
-
Verify that
pipis installed correctly.$pip3 --versionpip 21.3.1 from ~/.local/lib/python3.6/site-packages (python 3.6)
Sections
Install Amazon ParallelCluster with pip
Use pip to install Amazon ParallelCluster.
$python3 -m pip install "aws-parallelcluster<3.0" --upgrade --user
When you use the --user switch, pip installs Amazon ParallelCluster
to ~/.local/bin.
Verify that Amazon ParallelCluster installed correctly.
$pcluster version2.11.9
To upgrade to the latest version, run the installation command again.
$python3 -m pip 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
executable to your operating system's PATH environment variable.
To verify the folder in which pip installed Amazon ParallelCluster, run the following command.
$which pcluster/home/username/.local/bin/pcluster
If you omitted the --user switch when you installed Amazon 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 Amazon ParallelCluster, you're done with the installation. Otherwise, you must perform steps 3a – 3c again, adding this additional folder to the path.