This may be related. How to install python from source on a remote machine without root access.
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.
$ wget https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz
$ tar zxfv Python-3.6.9.tgz
$ find ~/inflated_location/Python-3.6.9/Python -type d | xargs chmod 0755
$ cd Python-3.6.9
- Install from source
$ ./configure --prefix=~/inflated_location/Python-3.6.9/Python
$ make
$ make install
- Export the path variable
$ nano ~/.bashrc
$ export PATH=~/inflated_folder/python/Python-3.6.9/:$PATH
$ source ~/.bashrc
Now you have python3.6 installed for logged in user and can be invoked now using command python
Installing py packages.
The easiest way that I have followed is
$ python -m pip install <package-name> --user
Reference: https://randomwalk.in/python/2019/10/27/Install-Python-copy.html
easy_install
is not available, you can installpip
to local withwget https://raw.github.com/pypa/pip/master/contrib/get-pip.py && python get-pip.py --user
– JorgeGT Nov 2 '14 at 18:51wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py --user
– qed Nov 22 '16 at 11:49--user
when runningpython get-pip.py --user
? – m81 Jan 26 '17 at 18:26