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.
Step 1.
- Login to your cPanel account.
- Click on “Setup Python App”
Step 2.
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.
Step 3.
This part was easier with the previous version of moodlemlbackend. That time, the moodlemlbackend did the job for you but now it does not.
So we need to do the job ourselves. These steps are based on the moodlehq/moodle-mlbackend-python/INSTALL-venv.md guide.
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.
Cheers,