This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Import Packages in a Python Operation

Im currently trying to create a new Python Operation for one of my Flows. 

For my Operation to work I need to import some packages like:

import requests
import json

Is there any possibility to install them in my Designer?
If Im trying to debug the flow, ill get an error bc Designer does not install the packages automatically.
Thanks for your help!

  • Verified Answer

    +1

    hiho,

    download the needed wheels from https://pypi.org/ and install them with pip (as Administrator)

    python.exe -m pip install "requests-2.28.1-py3-none-any.whl"

    Take care of all dependencies if you have no internet access.

    All packages will be installed into python\python-<version>\Lib\site-packages and can be used after a service restart.

    Keep in mind to update all Central or RAS the same way and note that all custom packages will be gone after applying an update.

    Greetz Rene

  • Verified Answer

    +1

    Hi Jannis,

    Another suggestion is to create a Python operation in Designer that will take care of the task to install the packages you need.

    Please follow the official documentation for this: https://docs.microfocus.com/doc/Operations_Orchestration/2022.05/PythonOperations#Install_python_package 

    You may want to reuse the same operation once you deploy your project / content pack on the Central to make sure the Python packages are installed also in Central and any RAS server connected to the Central that may execute the Python operation.

    This will work on any system that has internet access. If you have an isolated environment you will need to manually download and install your packages like suggested.

    Hope this helps!
    Florin