Install AppInspect on Windows

This topic includes details about installing the Splunk AppInspect Python-based package, including all required dependencies, on Microsoft Windows.

Note: These instructions were tested on Windows 7 SP1 and Windows 10 Pro, but may also work in other versions of Windows.

This topic contains the following sections:

Install AppInspect in a virtualenv virtual environment

Splunk recommends using virtualenv to create a virtual environment in which to install and use AppInspect. Using virtualenv enables you to install AppInspect in an isolated Python environment, and to ensure you're using versions of AppInspect dependencies that have been tested and are known to work with AppInspect. You can also install AppInspect without using virtualenv; see Install AppInspect without using virtualenv for more information.

Install virtualenv prerequisites

First, install dependencies for virtualenv: Python 2.7.x and pip.

  1. Install the latest version of Python 2.7 from https://www.python.org/downloads/.

    Notes: The Python installer can set path variables for you. In the "Customize Python" step of the install process, be sure to scroll down in the list of modules presented and select Add python.exe to Path for install.

    Splunk AppInspect requires Python 2.7.11 or later. It does not support Python 3.

  2. If you chose not to (or forgot to) have the Python installer add the Python executable to your system path in the previous step, you must manually set the Python environment variables by doing the following:

    1. Press CTRL+ESC, and then type edit the system environment variables.

    2. Click the Environment Variables button in the System Properties window.

    3. In the System Variables section at the bottom of the window, click the New button. In the Variable name input box, type PYTHON_HOME. In the Variable value input box, type C:\Python27. If you have installed Python in another location, enter its path here. Finally, click the OK button to save.

    4. Back in the Environment Variables window, find the Path variable in the System variables section and double-click it.

      • Windows 7/8/8.1: In the Variable value input box, append the following to the existing text, and then press Enter:
        ;%PYTHON_HOME%;%PYTHON_HOME%\scripts
      • Windows 10: In the Edit environment variable window, click New and enter %PYTHON_HOME%. Then click New again and enter %PYTHON_HOME%\scripts.
    5. Click OK to save your changes to the Path variable, click OK again to close the Environment Variables window, and finally click OK to close the System Properties window.

    6. To verify that your environment variables have been set up correctly, press CTRL+ESC, type cmd, and then press Enter. In the command window, enter python --version and press Enter. If the installed version of Python is displayed, the environment variables have been configured correctly. If not, verify that the path entered into the %PYTHON_HOME% environment variable is correct. You can quickly check this variable at a command prompt by typing echo %PYTHON_HOME% and then pressing Enter.

  3. Upgrade pip to the latest version by doing the following:

    1. Press CTRL+ESC, and then type cmd to open a console window. 

    2. At the command prompt, enter the following, and then press Enter: 

      > python -m pip install --upgrade pip

Install virtualenv and prepare a virtual environment

Next, install virtualenv and create a virtual environment.

  1. Install virtualenv:

    > pip install virtualenv

    For more installation options, see Installation in virtualenv Installation.

  2. Create a new virtual environment by running the following command:

    > virtualenv venv
    Note: venv is the name we've chosen to give to the directory where the virtual environment lives. You can use whatever name you want.

    For more information about creating a new virtual environment, see Usage in the virtualenv User Guide.

  3. Activate and enter the new virtual environment by running the following command, replacing \path\to\venv with the appropriate path on your system:

    > \path\to\venv\Scripts\activate

    For more information about activating virtualenv, see activate script in the virtualenv User Guide.

  4. Install AppInspect

    With the virtual environment activated, do the following to install Splunk AppInspect and its dependencies inside of the virtual environment:

    1. Download the AppInspect installation tarball, but do not decompress it. To download AppInspect, you must first agree to the following:

      "By downloading AppInspect here, I hereby accept the terms of the Splunk Software License Agreement. This tool is published by Splunk but is not supported." To verify the integrity of the downloaded ZIP file:
    2. The following command installs all additional Python dependencies in the virtual environment and configures it so you can run splunk-appinspect. Be sure to replace <version> so that the name of the file matches the one you downloaded.

      (venv)> python pip install splunk-appinspect-<version>.tar.gz
    3. Verify that AppInspect is installed by running the following command:

      (venv)> splunk-appinspect --help

    Install AppInspect without using virtualenv

    If you prefer to run AppInspect without using a virtualenv virtual environment, do the following:

    Install prerequisites

    First, install dependencies for Splunk AppInspect, including Python 2.7.x and pip.

    1. Install the latest version of Python 2.7 from https://www.python.org/downloads/.

      Notes: The Python installer can set path variables for you. In the "Customize Python" step of the install process, be sure to scroll down in the list of modules presented and select Add python.exe to Path for install.

      Splunk AppInspect requires Python 2.7.11 or later. It does not support Python 3.

    2. If you chose not to (or forgot to) have the Python installer add the Python executable to your system path in the previous step, you must manually set the Python environment variables by doing the following:

      1. Press CTRL+ESC, and then type edit the system environment variables.

      2. Click the Environment Variables button in the System Properties window.

      3. In the System Variables section at the bottom of the window, click the New button. In the Variable name input box, type PYTHON_HOME. In the Variable value input box, type C:\Python27. If you have installed Python in another location, enter its path here. Finally, click the OK button to save.

      4. Back in the Environment Variables window, find the Path variable in the System variables section and double-click it.

        • Windows 7/8/8.1: In the Variable value input box, append the following to the existing text, and then press Enter:
          ;%PYTHON_HOME%;%PYTHON_HOME%\scripts
        • Windows 10: In the Edit environment variable window, click New and enter %PYTHON_HOME%. Then click New again and enter %PYTHON_HOME%\scripts.
      5. Click OK to save your changes to the Path variable, click OK again to close the Environment Variables window, and finally click OK to close the System Properties window.

      6. To verify that your environment variables have been set up correctly, press CTRL+ESC, type cmd, and then press Enter. In the command window, enter python --version and press Enter. If the installed version of Python is displayed, the environment variables have been configured correctly. If not, verify that the path entered into the %PYTHON_HOME% environment variable is correct. You can quickly check this variable at a command prompt by typing echo %PYTHON_HOME% and then pressing Enter.

    3. Upgrade pip to the latest version by doing the following:

      1. Press CTRL+ESC, and then type cmd to open a console window.

      2. At the command prompt, enter the following, and then press Enter:

        > python -m pip install --upgrade pip
    4. Install AppInspect

      Install the AppInspect installation tarball and its dependencies by doing the following:

      1. Download the AppInspect installation tarball, but do not decompress it. To download AppInspect, you must first agree to the following:

        "By downloading AppInspect here, I hereby accept the terms of the Splunk Software License Agreement. This tool is published by Splunk but is not supported."

        To verify the integrity of the downloaded ZIP file:

      2. The following command installs AppInspect and its dependencies, and configures your system so you can run splunk-appinspect from any location in the command prompt window. Be sure to replace <version> so that the name of the file matches the one you downloaded.

        > python pip install splunk-appinspect-<version>.tar.gz
      3. Verify that AppInspect is installed by running the following command:

        > splunk-appinspect --help