I have recently encountered an issue where I have access to remote server, but the python version installed on it was 3.4. My application required 3.6+ and I do not have root access to install it using apt. So here are the steps I have followed: -
Installing Python 3.6 (works with any version per say)
Get the official download link from python.org website(Example. https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz)
Download the python source release and get the folder readied for installation from source.
- Install from source
- Export the path variable
Now you have python3.6 installed for logged in user and can be invoked now using command
Installing py packages.
The easiest way that I have followed is