Spotfire Service for Python Installation and Administration

Installing Python Packages Manually

If you have a small Spotfire Server deployment, and you do not need to manage packages across several nodes or servers, then you can install packages directly on the computer running the node manager, rather than creating an SPK.

About this task

Perform this task on the computer hosting the Spotfire Service for Python (in the directory where Python is installed), and then on the computer where Spotfire Server is installed.

Any time you install additional packages or update existing packages, be sure to install them in the directory you specified for your packagePath. You can have only one package path for the Spotfire Service for Python installation. See packagePath for more information.

Avoid installing packages that are included in the Spotfire Service for Python. Installing a different version of an included package can cause unexpected results. For a list of these packages, see Included Packages.

Note: When you update your Python installation, be sure to update your package installations, too.

Before you begin

  • You must have administrative privileges to edit files on the computer running the node manager.
  • You must have administrative privileges and the tools password to update the custom.properties file.

Procedure

  1. Create the directory to store the Python packages.
    This directory is specified as the path to use to install Python packages, and to set the Spotfire Service for Python custom property, packagePath.
  2. From the command prompt, browse to the directory where the Python interpreter for your Spotfire Service for Python is installed.
    By default, this directory is /nodemanager/services/<spotfire-service-for-python-name>/python.
  3. Run the following command to install the needed package.
    python -m pip install --target=<packagePath> <packagename>
    
    Note: Define the target location to install packages to the value you provided in the packagePath custom configuration setting.
    The package and its dependent packages are installed.
  4. Update the Spotfire Service for Python configuration to specify the package path.
    You need to export, edit, and reimport the custom.properties file only the first time to set the package path.
    Note: Remember that when you change the custom.properties, you must restart the Spotfire Service for Python to have it take effect.
    1. Follow steps 1-3 in Configuring the Service to export the service configuration file custom.properties.
    2. In the exported custom.properties file, locate the entry for packagePath.
    3. Provide the path that you specified for the installed packages.
      Note: The configuration setting packagePath requires forward slashes (/) regardless of operating system.
    4. Complete the steps to save and import the changed service configuration file, as described in Configuring the Service.