

# Installing the AWS ParallelCluster command line interface (CLI)
<a name="install-v3-parallelcluster"></a>

AWS ParallelCluster is distributed as a Python package and is installed using the Python `pip` package manager. For instructions on how to install Python packages, see [Installing packages](https://packaging.python.org/tutorials/installing-packages/) in the *Python Packaging User Guide*.

**Ways to install AWS ParallelCluster:**
+ [Install AWS ParallelCluster in a virtual environment (recommended)](install-v3-virtual-environment.md)
+ [Installing AWS ParallelCluster in a non-virtual environment using pip](install-v3-pip.md)
+ [Install AWS ParallelCluster as a standalone application](install-v3-install-standalone.md)

You can find the version number of the most recent CLI on the [releases page on GitHub](https://github.com/aws/aws-parallelcluster/releases). In this guide, the command examples assume that you have installed a version of Python that is later than version 3.6. The `pip` command examples use the `pip3` version.

**Manage both AWS ParallelCluster 2 and AWS ParallelCluster 3**  
If you use both AWS ParallelCluster 2 and AWS ParallelCluster 3 and want to manage the CLIs for both packages, we recommend that you install AWS ParallelCluster 2 and AWS ParallelCluster 3 in different [virtual environments](install-v3-virtual-environment.md). This ensures that you can continue using each version of AWS ParallelCluster and any associated cluster resources.

# Install AWS ParallelCluster in a virtual environment (recommended)
<a name="install-v3-virtual-environment"></a>

We recommend that you install AWS ParallelCluster in a virtual environment to avoid requirement version conflicts with other `pip` packages.

**Prerequisites**
+ AWS ParallelCluster requires Python 3.7 or later. If you don't already have it installed, [download a compatible version](https://www.python.org/downloads/) for your platform at [python.org](https://www.python.org/).

**To install AWS ParallelCluster in a virtual environment**

1. If `virtualenv` isn't installed, install `virtualenv` using `pip3`. If `python3 -m virtualenv help` displays help information, go to step 2.

   ```
   $ python3 -m pip install --upgrade pip
   $ python3 -m pip install --user --upgrade virtualenv
   ```

   Run `exit` to leave the current terminal window and open a new terminal window to pick up changes to the environment.

1. Create a virtual environment and name it.

   ```
   $ python3 -m virtualenv ~/apc-ve
   ```

   Alternatively, you can use the `-p` option to specify a specific version of Python.

   ```
   $ python3  -m virtualenv -p $(which python3) ~/apc-ve
   ```

1. <a name="activate-virtual-environment-3"></a>Activate your new virtual environment.

   ```
   $ source ~/apc-ve/bin/activate
   ```

1. Install AWS ParallelCluster into your virtual environment.

   ```
   (apc-ve)~$ python3 -m pip install --upgrade "aws-parallelcluster"
   ```

1. Install Node Version Manager and the latest Long-Term Support (LTS) Node.js version. AWS Cloud Development Kit (AWS CDK) requires Node.js for CloudFormation for template generation.
**Note**  
If your Node.js installation isn't working on your platform, you can install an LTS version prior to the latest LTS version. For more information, see the [Node.js release schedule](https://github.com/nodejs/release#release-schedule) and the [AWS CDK](https://docs.aws.amazon.com/cdk/v2/guide/work-with.html#work-with-prerequisites) prerequisites.  
Example Node.js installation command:  

   ```
   $  nvm install --lts=Hydrogen
   ```

   ```
   $ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
   $ chmod ug+x ~/.nvm/nvm.sh
   $ source ~/.nvm/nvm.sh
   $ nvm install --lts
   $ node --version
   ```

1. Verify that AWS ParallelCluster is installed correctly.

   ```
   $ pcluster version
   {
     "version": "3.15.0"
   }
   ```

You can use the `deactivate` command to exit the virtual environment. Each time you start a session, you must [reactivate the environment](#activate-virtual-environment-3).

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

```
(apc-ve)~$ python3 -m pip install --upgrade "aws-parallelcluster"
```

# Installing AWS ParallelCluster in a non-virtual environment using pip
<a name="install-v3-pip"></a>

You can also install AWS ParallelCluster in a non-virtual environment using pip, a package manager for Python packages.

**Prerequisites**
+ AWS ParallelCluster requires Python 3.7 or later. If you don't already have it installed, [download a compatible version](https://www.python.org/downloads/) for your platform at [python.org](https://www.python.org/).

**Install AWS ParallelCluster**

1. Use `pip` to install AWS ParallelCluster.

   ```
   $ python3 -m pip install "aws-parallelcluster" --upgrade --user
   ```

   When you use the `--user` switch, `pip` installs AWS ParallelCluster to `~/.local/bin`. 

1. Install Node Version Manager and the latest Long-Term Support (LTS) Node.js version. AWS Cloud Development Kit (AWS CDK) requires Node.js for CloudFormation for template generation.
**Note**  
If your Node.js installation isn't working on your platform, you can install an LTS version prior to the latest LTS version. For more information, see the [Node.js release schedule](https://github.com/nodejs/release#release-schedule) and the [AWS CDK](https://docs.aws.amazon.com/cdk/v2/guide/work-with.html#work-with-prerequisites) prerequisites.  

   ```
   $  nvm install --lts=Hydrogen
   ```

   ```
   $ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
   $ chmod ug+x ~/.nvm/nvm.sh
   $ source ~/.nvm/nvm.sh
   $ nvm install --lts
   $ node --version
   ```

1. Verify that AWS ParallelCluster installed correctly.

   ```
   $ pcluster version
   {
     "version": "3.15.0"
   }
   ```

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

   ```
   $ python3 -m pip install "aws-parallelcluster" --upgrade --user
   ```

# Install AWS ParallelCluster as a standalone application
<a name="install-v3-install-standalone"></a>

Install AWS ParallelCluster as a standalone application on your environment. Follow the instructions for installing AWS ParallelCluster on an available OS in the following section.

**Prerequisites**
+ An environment with an operating system compatible with an available version of the installer.
**Note**  
 AWS ParallelCluster requires NodeJS. AWS ParallelCluster Installer includes a bundled version of NodeJS (v18), which is installed if it does not already exist. If your system is not compatible with NodeJS v18, you should install NodeJS before installing AWS ParallelCluster. 

## Linux
<a name="collapsible-linux"></a>

------
#### [ Linux x86 (64-bit) ]

**Install AWS ParallelCluster on your environment.**

1. Download the latest [ pcluster installer](https://us-east-1-aws-parallelcluster.s3.amazonaws.com/parallelcluster/3.15.0/installer/pcluster-installer-bundle-3.15.0.1444-node-v22.22.0-Linux_x86_64-signed.zip) ([ checksum](https://us-east-1-aws-parallelcluster.s3.amazonaws.com/parallelcluster/3.15.0/installer/pcluster-installer-bundle-3.15.0.1444-node-v22.22.0-Linux_x86_64-signed.zip-sha256sum)).

1. Unzip the installer bundle and install AWS ParallelCluster by using the following commands:

   ```
   $ unzip pcluster-installer-bundle-<VERSION>-Linux_x86_64-signed.zip -d pcluster-installer-bundle
   $ cd pcluster-installer-bundle
   $ chmod +x install_pcluster.sh
   ```

1. Run the following install script.

   ```
   $ bash install_pcluster.sh
   ```

1. Verify that AWS ParallelCluster is installed correctly.

   ```
   $ pcluster version
   {
       "version": "3.15.0"
   }
   ```

**Troubleshooting `pcluster` installation errors**
+ If the AWS ParallelCluster version isn't returned in step 4, restart the terminal or `source` the `bash_profile` to update the `PATH` variable to include the new binary directory as shown in the following example:

  ```
  $ source ~/.bash_profile
  ```
+ If you use your `pcluster` installation to create clusters with `CustomActions` specified as HTTPS resources, rather than S3 URIs, you might see a `WARNING` message indicating that these resources might not be verified ([`SSL: CERTIFICATE_VERIFY_FAILED`]). This is caused by a known issue and you can ignore this warning if you trust the authenticity of the specified resources.

------

**Previous installer bundle versions**
+ None