On Oracle Linux 6, a newer version of Python is usually required. You can install a newer version alongside the existing version by downloading from Python, and then install the CLI in a virtual environment that uses the new version.
To install the new version of Python, run the following commands.
sudo yum install gcc libffi-devel python-devel openssl-devel
sudo easy_install pip
curl -O https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
tar -xvzf Python-3.6.0.tgz
sudo make install
We do not recommend installing the CLI in your system-wide Python and suggest that instead you install the CLI using the installer or virtual environment.
In cases where you are trying to install the CLI in your system-wide Python using the latest pip version, you might encounter conflicts with some distutils installed packages. Following is an example error message when this occurs:
sudo pip install oci-cli
Cannot uninstall 'requests'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Another option is to install the CLI for the user using the following command, although this approach is not supported: