- Install pyenv
- Install pyenv virtualenv
In fee calculator app root dir create a virtual env for a specific version of python (I am using 3.8.3, latest at time of writing), and give it a name.
$ cd .../laa-fee-calcultor
$ pyenv virtualenv 3.8.3 laa-fee-calculator
# confirm creation
$ pyenv versions
=>
system
*3.8.3
3.8.3/envs/laa-fee-calculator
laa-fee-calculator
$ pyenv activate laa-fee-calculator
$ pip install --upgrade setuptools pip wheel readline
$ pip install -r requirements.txt
pyenv local laa-fee-calculator
this creates .python-version
in the root of the app with the named virtualenv in it. This file is .gitignore
'd
For this to work you will need to add this to your .bash_profile
eval "$(pyenv virtualenv-init -)"
# pyenv
$ pyenv activate laa-fee-calculator
$ pyenv versions
$ pyenv deactivate
# django related
$ ./manage.py shell
$ ./manage.py dbshell
# data related
$ ./manage.py cleardata
$ ./manage.py loadalldata