How to upgrade Python and install required libraries from HP SA (Server Automation)?

I have an HP SA (Server Automation) agent installed on couple of servers.

The default Python version during installation is 2.7.

How can I upgrade Python and also install Python libraries (considering there is no internet connectivity on the target server) from HP SA Client into the target server?