Jump to content

Is tkinter gui creation supporting in Python with Spotfire 10.10

Deepak Mathew

Recommended Posts

  • 2 weeks later...

This error is due to that, the "matplotlib" package use Tcl capabilities to generate plots, and we have not included Tcl with the default Python interpreter (3.7.5) in Spotfire Analyst 10.10.2.

Tcl is not a Python package, but Python 3.x uses Tcl via its built-in "tkinter" package.

The following wikipedia article provides a brief description of Tcl and its use in Python:


You can work around this limitation by making your data function's Python script define the path to a valid "tcl8.6" folder on your machine that contains an "init.tcl" file.

The syntax for that looks like this:


import os

os.environ["TCL_LIBRARY"] = "/tcl/tcl8.6"


For example, if you have a locally installed python.exe (on the same machine) that runs the same script without throwing the "init.tcl" error:


then it should have an "init.tcl" file in this location:


If so, then you would be able to fix this problem when using Spotfire Analyst on your machine by putting this command at the beginning of your data function's Python script:

This section needs to be at the top of the python script, before any calls to "import matplotlib.*":


import os

os.environ["TCL_LIBRARY"] = "C:/python37/tcl/tcl8.6"


In this situation, you only need the right Tcl folder to make it work. You don't need the rest of the locally installed Python instance.

If you are using Python Service for the data function, you would need to copy the folder tcl, paste it to the Node Manager server hosting the python service, and refer to that path in your Python Data Function.

This has been reported previously as a product defect PYSRV-208, and it has been fixed in TSS 11.2.0, and python service 1.1.0 (python 3.7.8).

PYSRV-208: Include Tcl in the default Python interpreter used by data functions in Python Service and Spotfire Analyst


You may want to upgrade your Tibco Spotfire to 11.2.0 and use Python service 1.1.0 to have this issue resolved.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...