Navigate to your directory where you want to work
check the which python version available on the server by
ls -ls /usr/bin/python*
sudo apt update
sudo apt install wget build-essential checkinstall
sudo wget <https://www.python.org/ftp/python/3.6.10/Python-3.6.10.tgz> # get this file from python.org
where ever you have put the tar file:Python-3.6.10.tgz—> copy this file to the /usr/bin/
tar xzf Python-3.6.10.tgz # unzip the file
cd Python-3.6.10
ls
sudo ./configure --enable-optimizations
sudo make altinstall
pip install virtualenv
virtualenv --python=/usr/bin/python3.7 env_name
source env_name/bin/activate
verify python
which python
pip install -r requirements.txt
install pytorch