- The OpenStack Command-Line Interface (CLI) tools are supported on Python 2.7, so you must have a Python 2.7 environment installed. While El Capitan comes with Python 2.7, you want to set up your Mac environment so that you can use virtual environments and update easily.
- On Mac OSX, use
brewto install Python, which in turn requires Xcode Command Line Tools. Brew is available from http://brew.sh/#install. Instructions for proper setup can be found in the Hitchhiker’s Guide to Python.
pip install virtualenv. Read more in the Hitchhiker’s Guide to Python.
Using a virtual environment for the installation
- Start Terminal or iTerm in Mac OSX.
After installing virtualenv with
pip install virtualenv, create a virtual environment with this command where
<name>is the name of the virtual environment:
$ virtualenv openstack-cli
To activate the virtual environment, run the activate script:
Now that the virtual environment is active, your prompt changes to indicate the virtual environment you are currently using:
Installing the OpenStack client
With the virtual environment active, install the OpenStack client, which in turn installs python-novaclient and the other dependent clients:
(openstack-cli) $ pip install python-openstackclient
Now that the client is installed, you must provide credentials in the environment in order to run commands. Refer to Providing Metacloud Credentials to CLI Tools to continue.