Somehow Install python3. (I'm not sure. Needs to be updated later. This is for macOS.)
brew install python3
Install venv
module first to create virtual environment.
pip3 install venv
Make initial virtual environment files.
python3 -m venv venv
Activate the virtual environment.
. venv/bin/activate
Now 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.txt
Now you can run some python 3 codes within this virtual environment.
python some_python_code.py
Also you can install some modules you want.
pip install some_module_a some_module_b
You can make or update requirements.txt
freezing current modules.
pip freeze > requirements.txt
Later you can deactivate it.
deactivate