Two years after I wrote the article on how to set up the Python machine learning backend for Moodle Analytics and I got a comment that the method I described does not work anymore because the Python version has changed and the new moodlemlbackend 3.0.5 requires new Python libs.
So here are the new steps to set up moodlemlbackend 3.0.5 on Python 3.6.
- Login to your cPanel account.
- Click on “Setup Python App”
The new moodlemlbackend supports Python 3.6 now.
- Select Python 3.6 version from the drop-down list.
- Specify your Application root (eg. analytics).
- Specify your Application URL (eg. analytics). Do not leave it empty!
- Click “CREATE” button.
This part was easier with the previous version of moodlemlbackend. That time, the moodlemlbackend did the job for you but now it does not.
First, install the new pip. Type:
$ pip install -U pip
Then install the required modules.
$ pip install tensorflow sklearn numpy matplotlib boto3
Now we can install moodlemlbackend.
$ pip install moodlemlbackend
And now you can setup the Analyitics in Moodle.