# Installing OpenStack CLI Client on CentOS 7

You must have Python 2.7 and Python pip installed on your CentOS 7 host before you can install OpenStack CLI. Python is available, by default, on a CentOS 7 host.

For some reason, if Python and pip are not already installed, you must install Python and pip first, and then install OpenStack CLI.

Use the following commands to install Python and pip.

{% tabs %}
{% tab title="Shell" %}

```bash
yum install -y epel-release yum install -y gcc openssl-devel python-pip python-wheel python-virtualenv python-virtualenvwrapper
```

{% endtab %}
{% endtabs %}

## Install OpenStack CLI

Once Python and pip are installed, you are ready to set up a virtual environment and install OpenStack CLI on the virtual environment.

Follow the steps given below to install OpenStack CLI.

1. Load the virtualenvwrapper setup script into your current shell session.

{% tabs %}
{% tab title="Shell" %}

```bash
# location of virtualenvwrapper.sh
source /usr/bin/virtualenvwrapper.sh
# directory to store virtual environments
export WORKON_HOME=$HOME/.virtenvs
```

{% endtab %}
{% endtabs %}

2. Create a new virtual environment.

{% tabs %}
{% tab title="Shell" %}

```bash
mkvirtualenv os_cli
```

{% endtab %}
{% endtabs %}

The context switches to the newly created virtual environment.

3. Upgrade pip.

{% tabs %}
{% tab title="Shell" %}

```bash
pip install pip --upgrade
```

{% endtab %}
{% endtabs %}

4. Run the following command to set up the OpenStack CLI.

{% tabs %}
{% tab title="Shell" %}

```bash
pip install --upgrade --requirement https://raw.githubusercontent.com/platform9/support-locker/master/openstack-clients/requirements.txt --constraint https://raw.githubusercontent.com/openstack/requirements/stable/train/upper-constraints.txt
```

{% endtab %}
{% endtabs %}

OpenStack CLI is successfully installed, and ready to be used on the CentOS 7 host.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.platform9.com/managed-openstack/5.8/cli-access/cli-access-install-cli-centos.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
