These are outline instructions on setting up the Numbas editor on a PC running Windows, for personal use. For instances where multiple users need access to the editor, we recommend following the Ubuntu installation instructions.
The Numbas editor uses Django, a web framework written in the Python programming language. Django has many configuration options, which we won't detail here. For more information, consult the Django documentation.
python
might run the wrong version. The easiest way of making sure you use the right one is to create a virtual environment. Here's how to do that:
pip3 install virtualenv
virtualenv -p python3 numbas_venv
numbas_venv\Scripts\activate
You'll need to activate the virtual environment each time you want to use it.
numbas_runtime
, or use git to clone the repository:
git clone git://github.com/numbas/Numbas.git numbas_runtime
numbas_editor
, or use git to clone the repository:
git clone git://github.com/numbas/editor.git numbas_editor
pip3 install -r numbas_editor/requirements.txt
pip3 install -r numbas_runtime/requirements.txt
Pillow
. If so, try installing it using a wheel file:
pip3 install Pillow-3.4.2-cp35-cp35m-win32.whl
Run python first_setup.py
This will configure the editor based on your answers to a few questions, and write numbas/settings.py
.
The default answers for most of the questions apply only to Linux systems; make the appropriate changes using the paths described in the earlier steps.
If you've followed these instructions exactly, use the following values:
../numbas_runtime
sqlite3
static/
media/
static/previews/
/static/previews/
python
If you make any mistakes, you can run the script again, or edit numbas/settings.py
directly.
python manage.py runserver
If you used git to clone the runtime and editor repositories, run the following commands to update your installation:
cd numbas_editor
git pull origin master
python manage.py migrate
pip install -r requirements.txt
cd ../numbas_runtime
git pull origin master
pip install -r requirements.txt
The admin site, where you can manually edit entries in the database, is at http://localhost:8000/admin.