Li Mingchao Posted April 19, 2023 Share Posted April 19, 2023 I referred to this article Python Packages in TIBCO Spotfire , but I'm a little confused if there is a complete example of importing custom packages. For the already installed Spotfire service, how should we import custom Python packages step by step.s it possible to have a video demonstration?Thanks Mingchao Link to comment Share on other sites More sharing options...
Gaia Paolini Posted April 19, 2023 Share Posted April 19, 2023 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 Toolsthen 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 More sharing options...
Solution Fredrik Rosell Posted April 21, 2023 Solution Share Posted April 21, 2023 Adding to what Gaia wrote, there is a Dr. Spotfire video on Youtube - "Dr. Spotfire - Dive into Python Data Functions" ( ) that shows the whole process. Link to comment Share on other sites More sharing options...
Li Mingchao Posted May 4, 2023 Author Share Posted May 4, 2023 Thank you very much, this is very helpful for me, I have understood the solution Link to comment Share on other sites More sharing options...
Li Mingchao Posted May 4, 2023 Author Share Posted May 4, 2023 Thank you very much, this is very helpful for me. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now