If you are upgrading both the Controller and agents, first upgrade the Controller and then upgrade the agents.

To upgrade the Python to the latest version of the 22.x agent, run this command:

pip install -U appdynamics\<22.x

The upgrade will take effect the next time you restart the agent.