Home > Blogs > VMware {code}

Datacenter CLI – Installation Walkthrough

Datacenter CLI (DCLI) 2.9.1 has been released and the new features are fantastic! One of the key new updates is how we install this new version of DCLI. In the past, DCLI was installed as part of vSphere CLI (vCLI). In this current version, DCLI is installed through the Python Package Index (PyPI) using pip. PyPI is the official, third-party, online repository for Python packages. Pip is a package management system which handles the installation process of Python packages from repositories like PyPI.

If you already have Python installed, version 2.7 or later, we can install DCLI with the following command:

DCLI Installation Process

Let’s cover a couple scenarios where the above might not work.

Command Not Found – MacOS

MacOS comes with Python installed by default. However, this version of Python is generally used for system related tasks, isn’t up to date, and doesn’t always include pip. That means that there is a chance you could be greeted with the following:
DCLI Install - pip command not found

Installing a new, updated, version of Python is quite simple and can be done in multiple ways. My preferred way of installing Python on MacOS is with Homebrew, a widely used command line driven package manager. It can be easily downloaded and installed with the following command:

Example: Installing Homebrew

Then, we can install Python with the following command:

Afterwards, pip will now be available and we can now easily install DCLI with the command above!

Command Not Found – Windows

Windows does not come natively with Python installed. The first step will be to download and install a supported version of Python (2.7 or better). This can be obtained from the Python Downloads page. When performing the installation, ensure the ‘Add Python x.x to PATH’ option is checked.

DCLI Installation - Python Install

Once the installation is complete, open up your favorite terminal window (I used PowerShell), and run the following command:

DCLI Installation - pip install dcli


Datacenter CLI 2.9.1 greatly expands the available features and changed the installation process. This blog took a detailed look at the installation process and how to the more well-known issues people have ran into.

For more information about the DCLI 2.9.1 release, see the following vSphere blog post: New Release: VMware Datacenter CLI 2.9.1 For more specific information about, see the VMware Datacenter CLI (DCLI) User’s Guide.

This entry was posted in How to and tagged , on by .
Kyle Ruddy

About Kyle Ruddy

Kyle Ruddy is a Senior Technical Marketing Engineer at VMware in the Cloud Platform Business Unit. Kyle currently focuses on vSphere with Operations Management as well as all things API, SDK, and CLI. Kyle can be found blogging on VMware blogs, http://blogs.vmware.com/vSphere and http://blogs.vmware.com/PowerCLI, and his personal blog, http://www.thatcouldbeaproblem.com. You can follow Kyle on twitter as @kmruddy.

4 thoughts on “Datacenter CLI – Installation Walkthrough

  1. Pingback: New Release: VMware Datacenter CLI 2.9.1 – VMPRO.AT – all about virtualization

  2. Andrea Campa

    Great walkthrough Kyle!

  3. Ronny Steiner

    Am I the only one having issues with installing DCLI on Windows 10 (x64)?
    I have Python 3.6.5 installed and when running: ‘pip install dcli’, I always get an error which is related to pycrypto:
    Installing collected packages: werkzeug, pycrypto, dcli
    Running https://t.co/JFUGJjvQyW install for pycrypto … error
    Complete output from command c:\python36\python.exe -u -c “import setuptools, tokenize;__file__=’C:\\Users\\username\\AppData\\Local\\Temp\\pip-install-esa59duq\\pycrypto\\https://t.co/JFUGJjvQyW’;f=getattr(tokenize, ‘open’, open)(__file__);code=https://t.co/yqeoUzDJQO().replace(‘\r\n’, ‘\n’);f.close();exec(compile(code, __file__, ‘exec’))” install –record C:\Users\username\AppData\Local\Temp\pip-record-82o61fk0\install-record.txt –single-version-externally-managed –compile:

    Anyone else having the same issue?

    1. Kyle RuddyKyle Ruddy Post author

      You may be hitting a dependency of the pycrypto module.

      I’ve tried to replicate a couple times. Finally, I was able to get something similar on a Win10 fresh install. However my error was as follows:
      warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.
      building ‘Crypto.Random.OSRNG.winrandom’ extension
      error: Microsoft Visual C++ 14.0 is required. Get it with “Microsoft Visual C++ Build Tools”: http://landinghub.visualstudio.com/visual-cpp-build-tools

      After installing C++ 14, the install proceeded fine.


Leave a Reply

Your email address will not be published. Required fields are marked *