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:
Install Python 3.8 on your system - example instructions here: https://linuxize.com/post/how-to-install-python-3-8-on-ubuntu-18-04/
Remove the current virtual environment for your Oppia server
Install python3.8-dev
sudo apt install python3.8-dev
- note that it’s important to install this before the new virtualenv is createdRecreate the virtual environment, using
virtualenv -p /usr/bin/python3.8 env
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:
sudo apt remove libapache2-mod-wsgi-py3
sudo apt install apache2-dev
pip install mod_wsgi
(when virtualenv is enabled)Run
mod_wsgi-express module-config
and copy the 2 generated lines into your apache site config file. Note thatWSGIPythonHome
needs to be before the VirtualHost tag.
Update packages
Run:
(env)$ pip install -r requirements.txt
Update database
Run:
(env)$ python manage.py migrate
Update static files
Run:
(env)$ python manage.py compilescss
- don’t worry about the unclosed files warning messagesRun:
(env)$ python manage.py collectstatic
Run update_summaries –fromstart
Run the update summaries command from start:
(env)$ python manage.py update_summaries --fromstart
This might take a long time (hours) for large implementations, see Running Update Summaries in background