run using user with root access or append sudo
before each command:
$ apt update
$ apt install software-properties-common
# optional: required for installing pip packages which needs compiler. ex: uwsgi
$ apt-get install build-essential
$ add-apt-repository ppa:deadsnakes/ppa
$ apt install python3.7
# optional: required for installing pip packages which needs compiler. ex: uwsgi
$ apt install python3.7-dev
$ apt-get install python3.7-venv
$ python3.7
Python 3.7.4 (default, Jul 9 2019, 15:11:16)
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
$ python3.7 -m venv .py374env
$ source .py374env/bin/activate
(.py3742env) $ pip install requests