How to create a Spotfire Package for Python Packages from a Windows computer for Spotfire Analyst and Python Service running on a Node Manager hosted on a Windows machine.

How to create a Spotfire Package for Python Packages from a Windows computer for Spotfire Analyst and Python Service running on a Node Manager hosted on a Windows machine.

book

Article ID: KB0071122

calendar_today

Updated On:

Products Versions
Spotfire Service for Python All Version

Description

This article solely describes the steps for building a Spotfire Package (.spk) for Python Packages from a Spotfire Analyst machine for distribution to the Analyst users and on the Windows-based node running Python service for the Consumer, Business Author users.

Environment

Windows Environment

Resolution

Note: This article specifically talks about building the Spotfire package from the Spotfire Analyst client machine.

The steps below are executed on the Spotfire Analyst Machine.

1. Use a machine that has the Spotfire Analyst desktop client installed and internet access to the Python community's package repository.

2. Create the requirement file for Python Service (requirement_server.txt) and put it into the folder that contains the python executable (python.exe).
    (e.g: C:\<your_spotfire_analyst_installation_directroy>\TIBCO\Spotfire\<Spotfire-version>\Modules\Python Interpreter_3.909.10700.XX\python>)

3. Create the requirement file for Analyst (requirement_analyst.txt) and put it into the folder that contains the python executable (python.exe).

4. Open a Windows "cmd" console window.

5. Navigate to your Spotfire Analyst Install directory to the folder that contains the Python executable (python.exe).
    (example: cd C:\<your_spotfire_analyst_installation_directroy>\TIBCO\Spotfire\<Spotfire-version>\Modules\Python Interpreter_3.909.10700.XX\python>)
    
6. In the Windows "cmd" console window, run the following command from the Windows prompt(for Python Service):
    python -m spotfire.spk packages --name "PyPkg.spk" PyPkg.spk -v 1.0.0.0 requirement_server.txt

7. Using the web-based Spotfire Server administration console, deploy "PyPkg.spk" to Deployment and Packages.

8. Save Area.

9. Run the following command from the Windows prompt (for Spotfire Analyst):
     python -m spotfire.spk packages --name "AnalystPkg.spk" --analyst AnalystPkg.spk -v 1.0.0.0 requirement_analyst.txt

10. Using the web-based Spotfire Server administration console, deploy "AnalystPkg.spk" from the 'Deployment & Packages'.

11. Save Area.

Note: The requirement_server.txt/requirement_analyst.txt file contains the python libraries and it's versions which you need for your Python scripts to run.

For example :
==============
## requirement_server ##
nltk == 3.4.5
gensim == 3.8.1
==============

For more information on Python Package Distribution methods/processes check the manual for the section:  Distribute Python Packages
 

Issue/Introduction

The article illustrates how to create Spotfire Package for Python Packages from a Windows computer for Spotfire Analyst and Python Service hosted on a Whindows based Node Manager.

Additional Information

Doc: TIBCO Spotfire Service Python Installation and Administration


Doc :TIBCO Spotfire® Server and Environment - Installation and Administration