Jump to content

Can I import custom python packages to spotfire?


Li Mingchao
Go to solution Solved by Fredrik Rosell,

Recommended Posts

I am not sure how you would get a video demonstration, probably contacting support?

This article might also help:

https://community.spotfire.com/s/article/using-python-packages-tibco-spotfire#:~:text=In%20order%20to%20import%20a,or%20Spotfire's%20inbuilt%20Python%20Tools.&text=At%20this%20location%2C%20you%20can,to%20install%20the%20nltk%20package.

There is a quick and easy shortcut to importing Python packages, that works as an ungoverned one-off to your own installation only, but you can at least try it for quick testing.

1 - to find where Spotfire Python packages are installed, from your open Spotfire dashboard, on the top menu click on Tools > Python Tools

then look at the Path to Local Python Interpreter string.

This path should be something like "C:UsersxxxTIBCOSpotfireyyyModuleszzzpythonpython.exe"

(give or take some intermediate sub-folders; here xxx yyy and zzz are just placeholders for whatever your own installation says)

2 - The first bit of this string, up to 'python' will tell you where your Spotfire installation expects Python modules.

In order to put a new Python module into it so that Spotfire sees it, you need to copy your custom Python folder into the site-packages folder:

"C:UsersxxxTIBCOSpotfireyyyModuleszzzpythonLibsite-packages"

so if your module is called e.g. 'my_python' you would copy it there, then invoke it simply as 'import my_python' from your script within Spotfire.

Link to comment
Share on other sites

  • 2 weeks later...

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...