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

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.

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:

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

Click the Environment Variables button in the System Properties window.

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.

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.

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.

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.

Upgrade pip to the latest version by doing the following:

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

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.

Install virtualenv:

> pip install virtualenv

For more installation options, see Installation in virtualenv Installation.

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.

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.

Install AppInspect

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

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

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

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

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.

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:

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

Click the Environment Variables button in the System Properties window.

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.

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.

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.

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.

Upgrade pip to the latest version by doing the following:

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

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

> python -m pip install --upgrade pip

Install AppInspect

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

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

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.

We use our own and third-party cookies to provide you with a great online experience. We also use these cookies to improve our products and services, support our marketing campaigns, and advertise to you on our website and other websites. Some cookies may continue to collect information after you have left our website.
Learn more (including how to update your settings) here »