Upgrading to OppiaMobile Server v0.13.0

Set up/configure Python 3.8

If you are already using Ubuntu 20.04 or above, then the default Python is already set to being 3.8, and then you only need to update the apache config.

If you are using an earlier version of Ubuntu you will first need to install Python 3.8 and then configure, using these instructions:

  1. Install Python 3.8 on your system - example instructions here: https://linuxize.com/post/how-to-install-python-3-8-on-ubuntu-18-04/

  2. Remove the current virtual environment for your Oppia server

  3. Install python3.8-dev sudo apt install python3.8-dev - note that it’s important to install this before the new virtualenv is created

  4. Recreate the virtual environment, using virtualenv -p /usr/bin/python3.8 env

  5. Enable the virtual environment and install all the packages:

    • source env/bin/activate

    • pip install -r requirements.txt

If you are using Apache for your webserver, then there are some more configuration changes to make:

  1. sudo apt remove libapache2-mod-wsgi-py3

  2. sudo apt install apache2-dev

  3. pip install mod_wsgi (when virtualenv is enabled)

  4. Run mod_wsgi-express module-config and copy the 2 generated lines into your apache site config file. Note that WSGIPythonHome needs to be before the VirtualHost tag.

Update packages

  1. Run: (env)$ pip install -r requirements.txt

Update database

  1. Run: (env)$ python manage.py migrate

Update static files

  1. Run: (env)$ python manage.py compilescss - don’t worry about the unclosed files warning messages

  2. Run: (env)$ python manage.py collectstatic

Run update_summaries –fromstart

  1. Run the update summaries command from start: (env)$ python manage.py update_summaries --fromstart

  2. This might take a long time (hours) for large implementations, see Running Update Summaries in background