Performing Prerequisite Tasks for the Command Line Interface

Before downloading and installing the CLI, install cURL and Python on your machine if they are not already installed. The Python installation steps vary by operating system.

Prerequisites for CLI installation and configuration are:
  • cURL command-line tool.

  • Python 3.3 or later.

  1. Install cURL.

    cURL is an open source, command-line tool for transferring data with URL syntax, supporting various protocols including HTTP and HTTPs.

    1. In your browser, navigate to the cURL home page at http://curl.haxx.se and click Download in the navigation menu.
    2. On the cURL Releases and Downloads page, locate the SSL-enabled version of the cURL software that corresponds to your operating system, click the link to download the ZIP file, and extract the executable to the desired folder.
  2. If you are running Windows, follow these steps to install Python 3.3 or later.

    If you are running Linux, skip to step 3.

    1. Launch a Windows command prompt.
    2. Determine the version of Python you currently have installed on your machine.
      python --version
    3. Download the Python Windows installation executable from python.org.
    4. Launch the installer. For example:
      python-3.6.5.exe

      The Python installation wizard displays.

    5. Select the check box Add Python to PATH. Then click Install Now.
    6. When the installation has finished, proceed to Downloading the Command Line Interface.
  3. If you are running Linux, follow these steps to install Python 3.3 or later.
    1. Launch a Linux terminal.
    2. Determine the version of Python you currently have installed on your machine.
      python --version
    3. Download the Python source code archive from python.org.
    4. Extract the archive and change directories to the destination folder. For example:
      tar xf Python-3.5.1.tar.xz
      cd Python-3.5.1
    5. Create a home directory for the Python installation. For example:
      mkdir /u01/python
    6. Build and install Python to your Python home directory:
      ./configure --prefix=/u01/python
      make
      make install

      Note:

      The Python source installation requires the following Linux OS packages to be installed: gcc and openssl-devel. If openssl-devel is not available Python will not install the PIP tool.
    7. Add your Python installation’s bin directory to the PATH environment variable.

      For example, add the following line to the end of ~/.bash_profile:

      export PATH=/u01/python/bin:$PATH

Note:

Only Oracle Cloud at Customer This topic applies only to Oracle Cloud at Customer.

On Oracle Cloud at Customer, after installing Python and the CLI, you will get an error message:

psm command not found

To avoid this issue, after installing Python, you must downgrade to PIP version 9.x.x. Run these three commands to perform the PIP downgrade:

python -m pip uninstall pip 
python -m ensurepip 
python -m pip install -U "pip<10"