Yasemin Alpay Posted November 27, 2023 Share Posted November 27, 2023 Hi everyone! I am working on a project that integrates the Tibco Streambase program with Python. How can I use python libraries in streambase application? Is there a way to install them into the application?Thank you in advanced Link to comment Share on other sites More sharing options...
Andy-dont-use Pritchard Posted November 27, 2023 Share Posted November 27, 2023 Hi,Never tried to use it but there is a Python Operator ... Documented here https://docs.tibco.com/pub/str/11.1.0/doc/html/authoring/pythonoperator.html HTH ... Andy Link to comment Share on other sites More sharing options...
Yasemin Alpay Posted November 28, 2023 Author Share Posted November 28, 2023 Hi Andy,Thank you for your prompt response.We are using some libraries which are not build-in python, however we are working on a server which can't use pip install.So, we are trying to import these libraries manually.How can we use the library we imported, is there a place for python library folders in streambase?We are using Maven for java libraries, is there a similar way for python?Additionally, can we install the libraries in Streambase itself?Thank you in advanced.Kind Regards,Yasemin Link to comment Share on other sites More sharing options...
Andy-dont-use Pritchard Posted November 28, 2023 Share Posted November 28, 2023 Apologies I'm not able to help, but I have let some of our product experts know what you need and hopefully they will be able to answer shortly. Link to comment Share on other sites More sharing options...
Yasemin Alpay Posted November 28, 2023 Author Share Posted November 28, 2023 Hi Andy,Great news, thank you for your support.Kind Regards,Yasemin Link to comment Share on other sites More sharing options...
Glenn Hoskins 2 Posted November 28, 2023 Share Posted November 28, 2023 Hi Yasemin, There is a sample for using Python operators in the project. If you go to File > Import Samples and Community Content and then in the list type python you will see one called "Using python operators for modeling or other tasks". Go ahead and import that if you haven't already.Inside that sample there are a couple of EventFlows that show how to use the Python operators. You will see they have a link to a configuration file called Python.conf which you can find under src/main/configurations. If you open that up, there is a section down below where it says executable = "C:/Python36/python.exe".Sorry for the long preamble, but this configuration points at your python environment on the machine. This is an example, but make sure you point it to the exact path of where your python.exe is located, once you have set it up. But this is also where you will install your python dependencies, and you can do that by launching the python.exe environment and applying whatever commands you need to install your libraries. Normally we would use pip for this, but you mention you cannot use this, so this might require some more research to install your libs. But that will be 100% python commands, nothing to do with Streaming. Once you've set things up and tested your code just in the python console, then it should be fine inside Streaming because it will use the same environment with the same libs.Thanks,Glenn Link to comment Share on other sites More sharing options...
Glenn Hoskins 2 Posted November 28, 2023 Share Posted November 28, 2023 As an example, I have used this in a python environment used by Streaming to install these dependencies (but using pip)python -m pip install pandaspython -m pip install numpypython -m pip install sklearnpython -m pip install pickle-mixinpython -m pip install tensorflowpython -m pip install scikit-learn 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