Somehow Install python3. (I'm not sure. Needs to be updated later. This is for macOS.)
brew install python3Install venv module first to create virtual environment.
pip3 install venvMake initial virtual environment files.
python3 -m venv venvActivate the virtual environment.
. venv/bin/activateNow the python command and the pip command is for python 3 which works in this virtual environment.
Install modules from requirements.txt.
pip install -r requirements.txtNow you can run some python 3 codes within this virtual environment.
python some_python_code.pyAlso you can install some modules you want.
pip install some_module_a some_module_bYou can make or update requirements.txt freezing current modules.
pip freeze > requirements.txtLater you can deactivate it.
deactivate