# Package management for the Spotfire Service for Python

Spotfire Service for Python programmers in your organization can develop their own packages or take advantage of some of the thousands of compatible packages developed by other Python programmers, and then share the analyses that use those functions with Spotfire users in your organization.

The largest and most commonly-used curated repository for Python packages is the Python Package Index (PyPI). Administrators should check with authors to make sure they know the location for needed packages.

Spotfire analysts can create data functions that use these packages, and then share them with either other analysts using the installed Spotfire client, or with Spotfire web client users.

Important: Packages must be installed in the same type of environment as where they are executed. For example, if you built the debian:12-slim Docker image for your containerized Spotfire Service for Python, make sure the packages are installed on a node manager running the same operating system as the containerized engines. If this is not possible, then see the workaround options in Troubleshooting the service.

- To share a collection of Python packages and data functions that use them with Spotfire installations connected to your Spotfire Server, create the Spotfire package (SPK) containing the Python packages, and use the `--analyst` flag. For more information, see the instructions in the guide Python Data Functions in Spotfire®, provided with the Spotfire documentation. Packages deployed in this manner are distributed to other Spotfire installations in your organization when they connect to the Spotfire Server where the packages are deployed.
  Note: Packages that require post-install steps, such as pywin32, cannot be installed using a Spotfire SPK but must be installed manually in Spotfire Analyst or Python Service.
- To enable data functions that use the code in the Python packages for web client users, see Distribute Python packages. Packages deployed in this manner are available on the Spotfire Server node manager where the Spotfire Service for Python is installed.

A Spotfire package must be created using the same operating system as that of the node manager running the Spotfire Service for Python.
Note: The exception to this rule is if you use the provided Docker containers to bundle Python packages for a Linux node manager: you can create this SPK for a Linux deployment on either a Linux computer or on a Windows computer. See Build a Spotfire package for Spotfire Service for Python (Linux).

- If your node manager is running on a Windows server, then you can create the SPK either from a Windows computer running the installed Spotfire client, or you can create the SPK from the computer running the node manager where the Spotfire Service for Python is installed.
- If your node manager is running on a Linux server, then you can create the SPK using the provided Docker containers from your desktop computer, or you can create the SPK from the computer running the node manager where the Spotfire Service for Python is installed.

The following image shows the workflow for creating an SPK to share Python packages with other analysts, or to enable data functions for Spotfire web client users.