This source is licensed under GPLv3, see LICENSE.txt (note: metacademy's content is CC BY SA 3.0).
Current installation instructions for *nix and OSX (6 Oct 2013), all commands are executed from the terminal
-
Install python 2.7X. NB: install
python-devel
if you're using a package manager such as apt-get. The following command should print a path (if this command raises an exception, make sure that you have thepython-devel
version installed): -
python -c 'from distutils.sysconfig import get_makefile_filename as m; print m()'
-
Install gcc (OSX users: installing the OSX developer tools is probably the easiest way to do this). The following command should not throw an error:
gcc -v
-
Install pip; here are pip's installation instructions. The following command should not throw an error:
pip -V
We recommend using a virtual environment if you will be developing for the metacademy application, this way, metacademy won't conflict with your system libraries
-
install virtualenv
pip install virtualenv
(you may need to instead runsudo pip install virtualenv
) -
create a top-level metacademy directory in a desired location, e.g.
mkdir -p ~/MyProjects/metacademy
-
go to the top-level metacademy directory
cd ~/MyProjects/metacademy
-
initialize a virtual environment in this directory
virtualenv --no-site-packages .
-
activate your virtual environment
source bin/activate
-
from your top-level metacademy directory, clone the content and the application servers:
git clone https://github.com/metacademy/metacademy-application.git git clone https://github.com/metacademy/metacademy-content.git
-
create a
local_dbs
directory (note: you can move/change this directory as long as you updateconfig.py
appropriately, see below)mkdir local_dbs
-
create appropriate subdirectories (note: you can move/change these directories as long as you update
config.py
appropriately, see below)mkdir local_dbs/django_db local_dbs/content_index local_dbs/app_index
-
go to the
metacademy-application
directorycd metacademy-application
-
install the metacademy-application dependencies
pip install -r requirements.txt
-
copy
config-template.py
toconfig.py
cp config-template.py config.py
-
copy
app_server/settings_local-template.py
toapp_server/settings_local.py
cp app_server/settings_local-template.py app_server/settings_local.py
-
add the
metacademy-application
to yourPYTHONPATH
environmental variable (this assumes you're running a bash terminal, if you're not, set yourPYTHONPATH
to include themetacademy-application
directory)echo "export PYTHONPATH=$PWD:$PYTHONPATH" >> ../bin/activate source ../bin/activate
-
from
metacademy-application
project directory:python app_server/manage.py syncdb # you'll be prompted to create an admin account -- simply follow the instructions python app_server/manage.py migrate ./run_test_servers.sh
-
Open localhost:8080 with a modern javascript-enabled browser, preferably a webkit-based browser
Note: the initial search may take some time to load (the backend must load the graph into memory), but all subsequent pages should load much quicker.
If you have any problems with this installations, please submit a ticket at https://github.com/metacademy/metacademy-application/issues?state=open
Some of metacademy's ancillary functions currently depend on scipy
. Scipy can be tricky to install (pip install scipy
won't work unless you have all of the systems-level dependencies) so we have made it an optional dependency. Once you have scipy installed on your machine (google will help here...), link it's site-packages folder to to your virtual environment's lib/python2.7/site-packages/
folder. On my machine, this command was:
ln -s /usr/local/lib/python2.7/site-packages/scipy lib/python2.7/site-packages/