CommCare Cloud

23. Upgrade to Python 3

Date: 2018-07-18

Optional per env: required on all environments

CommCare Version Dependency

The following version of CommCare must be deployed before rolling out this change: 476e3291

Change Context

This change installs Python 3.6.8, builds a new virtualenv, and runs CommCare HQ in Python 3.

Details

CommCare HQ will drop support for Python 2 on August 22, 2019. Performing these steps will ensure that your environment will be able to receive updates at that date.

Steps to update

  1. Update to the latest commcare-cloud
  2. Install Python 3 requirements and create Python 3 Virtualenv:
      cchq <env> deploy-stack --tags=py3
    

    It will do a dry run, after which you can review the changes and enter ‘y’ to apply.

  3. Update Python processes to use Python 3
      cchq <env> update-supervisor-confs
    

    It will do a dry run, after which you can review the changes and enter ‘y’ to apply. It will also ask you if you want to reload configs and restart services, to which you should also reply ‘y’.