Creating a Spotfire Package for an Alternative Python Interpreter (for Windows)

The installation of Spotfire Service for Python on your Spotfire Server includes a Python interpreter and a set of packages to enable using Python. An installation of Spotfire Analyst that connects to the Spotfire Server also includes the same version of a Python interpreter. You can provide a different version of the Python interpreter, if needed, on both the Spotfire Server and Spotfire Analyst.

To install an alternative version of the Python interpreter on both the Spotfire Server and in the Spotfire Analyst, create a Spotfire package (SPK) containing the Python interpreter for each of the installations, and then upload the SPKs to the Spotfire Server.
Note: Remember that the same version of the Python interpreter must run on both the Spotfire Server and the Spotfire Analyst computers that connect to it.

Perform this task on a Windows computer where the Python interpreter that you want to distribute is installed.

Building an SPK on a Windows computer creates an SPK that works only on a Spotfire Server node manager installed on a Windows server. If you are running a Spotfire Server node manager on a Linux server, see Build a Suitable Python Interpreter for Spotfire Service for Python (for Linux)

This procedure describes installing the 'spotfire' package into the Python interpreter that you want to distribute. Alternatively, you can create a virtual environment to keep your installation of Python pristine, in the case where you either do not want to (or cannot) install the 'spotfire' package into the Python interpreter. See Creating a Virtual Environment for an Alternative Python Interpreter (Spotfire Analyst Computer) for those instructions.

Prerequisites

Before you begin, complete the following tasks.

  1. Download and install a suitable 64-bit Python interpreter. Python 3.7 or higher is required. Make sure it is configured to work correctly with your system. (The steps in this task demonstrate building the Python interpreter using Python version 3.8.10.)
  2. Download TIBCO Spotfire® Statistics Services installation for your operating system from the TIBCO product site edelivery.tibco.com (license and account required). Spotfire® Statistics Services includes the Spotfire Service for Python.
    Note: You do not need to install Spotfire Statistics Services.
  3. In the Spotfire Statistics Services downloaded bundle, find the component Spotfire Service for Python.
  4. Extract the contents of the Spotfire Service for Python installation archive.

Procedure

  1. Install the 'spotfire' package into your Python interpreter.
    path/to/python/to/package/ python -m pip install spotfire
    Where path/to/python/to/package is the path to the Python interpreter to include in the package.
    Note: This also downloads and installs the other packages required by the Spotfire Service for Python.
  2. Build the Python interpreter SPK for the Spotfire Server.
    path/to/python/to/package/python -m spotfire.spk python name1.spk
    This command creates an SPK to install the Spotfire Service for Python on the node manager.
    Tip: Provide a meaningful name for the .spk file so you can find it easily and distinguish it from the one you create in Step 2.
  3. Build the Python interpreter SPK for the Spotfire Analyst clients.
    path/to/python/to/package/python -m spotfire.spk python --analyst name2.spk
    The --analyst option specifies to the Spotfire Server that the SPK contents should be distributed to Spotfire Analyst clients connected to the Spotfire Server.
    Tip: Provide a meaningful name for the .spk file so you can find it easily and distinguish it from the one you create in Step 3.

Result

The packages containing the Python interpreter to upload to the Spotfire Server can be found in the .spk files that you created.

What to do next

Add the SPKs to the Spotfire Server Deployment area, and then validate and save the area. See Adding Software Packages to a Deployment Area and Updating Services in the TIBCO Spotfire® Server Installation and Administration guide for more information. The next time the Spotfire Analyst users connect to the Spotfire Server, they are prompted to update their installations with the new Python Interpreter and packages.