Automic Workload Automation

 View Only

 Installing a python package with pip that contains a cli on an Automic agent

Gerry_Grimm_9064's profile image
Gerry_Grimm_9064 posted May 16, 2025 03:09 PM

I'm posting the following question on behalf of a developer.  Has anyone done something similar to this?  If so, would you be willing to share?   

A python package was built that can be installed with pip that contains a cli to be used to launch Spark jobs.

Once the python package has been installed from the Azure Artifact Feed on an Automic Agent via pip it can then be referenced via shell.

How would we go about installing this pip package on an Automic Agent?

Some Linux distributions do not allow global pip installs and require a python virtual environment to be created to install inside of (https://docs.python.org/3/library/venv.html). How would a person go about trying to install the cli and testing it?

Joel Wiesmann's profile image
Joel Wiesmann

Hello Gerry,

What role does the Automic agent play in your question? To me this sounds like a general question about using Python/Pip.

If the developer provides a script for the agent that requires some python packages to be available, it is certainly the best idea to use virtual environments. There are also other solutions besides venv like poetry that are a bit more modern / stable and have more features.

Nevertheless, you need a plan on how to deploy the whole thing - put the script on the server, create a virtual environment, install dependencies etc.. This cannot be answered in general and depends on your company standards.

Regards
Joel