Open edX notes installation

Hi community

I am trying to install notes and annotations using guide from

While i am Installing the edx-notes-api using ansible as per step 5 i am getting below error.

Please advice how can i go about it?

failed: [localhost] (item=base.txt) => {“cmd”: “/edx/app/edx_notes_ap
i/venvs/edx_notes_api/bin/pip2 install --exists-action w -r /edx/app/
edx_notes_api/edx_notes_api/requirements/base.txt”, “failed”: true, "
item": “base.txt”, “msg”: “stdout: Collecting coreapi==2.3.3\n Using
one-any.whl\nCollecting coreschema==0.0.4\n Using cached https://fil
ing django-cors-headers==2.4.0\n Using cached https://files.pythonho
cting django-haystack==2.8.0\n Using cached https://files.pythonhost
debcf79b3dd08/django_haystack-2.8.0-py2-none-any.whl\nCollecting djan
go-rest-swagger==2.1.2\n Using cached
956e610/django_rest_swagger-2.1.2-py2.py3-none-any.whl\nCollecting dj
ango-waffle==0.18.0\n Using cached
755f/django_waffle-0.18.0-py2.py3-none-any.whl\nCollecting django==1.
11.26\n Using cached
11.26-py2.py3-none-any.whl\nCollecting djangorestframework-jwt==1.11.
0\n Using cached
mework_jwt-1.11.0-py2.py3-none-any.whl\n\n:stderr: DEPRECATION: Pytho
n 2.7 will reach the end of its life on January 1st, 2020. Please upg
rade your Python as Python 2.7 won’t be maintained after that date. A
future version of pip will drop support for Python 2.7. More details
about Python 2 support in pip, can be found at
n/latest/development/release-process/#python-2-support\nERROR: Could
not find a version that satisfies the requirement djangorestframework
==3.10.3 (from -r /edx/app/edx_notes_api/edx_notes_api/requirements/b
ase.txt (line 15)) (from versions: 0.1, 0.1.1, 0.2.0, 0.2.1, 0.2.2, 0
.2.3, 0.2.4, 0.3.0, 0.3.1, 0.3.2, 0.3.3, 0.4.0, 2.0.0, 2.0.1, 2.0.2,
2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.1.5, 2.1.6, 2.1.7, 2.1.8, 2.1.9,
2.1.10, 2.1.11, 2.1.12, 2.1.13, 2.1.14, 2.1.15, 2.1.16, 2.1.17, 2.2.
0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.2.6, 2.2.7, 2.3.0, 2.3.1, 2.3
.2, 2.3.3, 2.3.4, 2.3.5, 2.3.6, 2.3.7, 2.3.8, 2.3.9, 2.3.10, 2.3.11,
2.3.12, 2.3.13, 2.3.14, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4
.6, 2.4.8, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.1.0, 3.1.1, 3.
1.2, 3.1.3, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.5, 3.3.0, 3.3.1, 3
.3.2, 3.3.3, 3.4.0, 3.4.1, 3.4.2, 3.4.3, 3.4.4, 3.4.5, 3.4.6, 3.4.7,
3.5.0, 3.5.1, 3.5.2, 3.5.3, 3.5.4, 3.6.0, 3.6.1, 3.6.2, 3.6.3, 3.6.4,
3.7.0, 3.7.1, 3.7.2, 3.7.3, 3.7.4, 3.7.5, 3.7.6, 3.7.7, 3.8.0, 3.8.1
, 3.8.2, 3.9.0, 3.9.1, 3.9.2, 3.9.3, 3.9.4)\nERROR: No matching distr
ibution found for djangorestframework==3.10.3 (from -r /edx/app/edx_n
otes_api/edx_notes_api/requirements/base.txt (line 15))\n”}
to retry, use: --limit @/edx/app/edx_ansible/edx_ansible/play

PLAY RECAP **********************************************************

localhost : ok=90 changed=15 unreachable=0 fa

_timing: Install ubuntu system packages -----------------------------
--------------------- 4.71s
_timing: Install role-independent useful system packages [0] --------
--------------------- 4.55s
_timing: Install system packages ------------------------------------
--------------------- 4.26s
_timing: Install the nginx package ----------------------------------
--------------------- 4.24s
_timing: Checkout code over https -----------------------------------
--------------------- 4.14s
_timing: Install application requirements ---------------------------
--------------------- 2.10s
_timing: pip install virtualenv -------------------------------------
--------------------- 2.03s
_timing: Install aws python packages --------------------------------
--------------------- 1.28s
_timing: Copy the templates to their respestive destination ---------
--------------------- 1.22s
_timing: Install supervisor in its venv [1] -------------------------
--------------------- 1.12s
Playbook Deploy edX Notes API finished: 2019-12-10 14:38:43.127766, 1
95 total tasks. 0:00:55.692172 elapsed.

Your error trace says that it has issue with distribution of djangorestframework.

In master branch djangorestframework version has been upgraded to 3.10.3 from 3.6.3, check requirements/base.txt file in this commit.

This is happening becuse your configuration repo will be master.

Checkout configuration repo to open-release/ironwood.master if you don’t have any diff in it, then try again.


I will try this.

Hi @Melsu, did you ever figure this out? I am getting a similar error but with the django-cors-header not matching. I am pretty new to this all, but I have spent many hours tracking errors and with no success. Thanks!

Hi @brenton.kreiger

So I did follow 3 instructions to get through this. I will try and document that for you by EOD today.

Thanks @Melsu - did you ever end up getting to this?

Hi @brenton.kreiger

You follow Lawrence McDaniel’s blog step 1 & step 2. Additionally define Version in step 2 as open-release/ironwood.2
While performing step 3
First and foremost even before using source command do

sudo vim /edx/app/edx_ansible/edx_ansible/playbooks/notes.yml

Add #/comment out -aws in role section.

Then follow

source /edx/app/edx_ansible/venvs/edx_ansible/bin/activate
cd /edx/app/edx_ansible/edx_ansible/playbooks
sudo ansible-playbook -i ‘localhost,’ -c local ./run_role.yml -e ‘role=edxlocal’ -e@roles/edx_notes_api/defaults/main.yml

Subsequently run these 2 additional commands before going to step 4

sudo ansible-playbook -i ‘localhost,’ -c local ./run_role.yml -e ‘role=nginx’ -e ‘nginx_sites=edx_notes_api’ -e@roles/edx_notes_api/defaults/main.yml


sudo ansible-playbook -i ‘localhost,’ -c local ./run_role.yml -e ‘role=edx_notes_api’ -e@roles/edx_notes_api/defaults/main.yml

Continue to step 4 and make sure you don’t use


I think this shall work is what melsu told me. He isn’t able to come online due to personal reasons and he apologies for the delay.



Thank you so much for your help! I am still running into a few issues -

When I run the “2 additional commands” -

sudo ansible-playbook -i ‘localhost,’ -c local ./run_role.yml -e ‘role=nginx’ -e ‘nginx_sites=edx_notes_api’ -e@roles/edx_notes_api/defaults/main.yml
sudo ansible-playbook -i ‘localhost,’ -c local ./run_role.yml -e ‘role=edx_notes_api’ -e@roles/edx_notes_api/defaults/main.yml

I get “ERROR! ‘role’ is undefined” or "ERROR! the playbook: ‘niginx_sites=edx_notes_api’ could not be found’

I am also receiving the following error when I follow step 3, I don’t know if it is contributing to this problem
I am having later in the additional steps -

TASK [mysql : Look for mysql 5.6] *******************************************************************************************************
fatal: [localhost]: FAILED! => {“changed”: false, “cmd”: “dpkg -s mysql-server”, “delta”: “0:00:00.023480”, “end”: “2020-06-02 13:51:29.291993”, “failed”: true, “rc”: 1, “start”: “2020-06-02 13:51:29.268513”, “stderr”: “dpkg-query: package ‘mysql-server’ is not installed and no information is available\nUse dpkg --info (= dpkg-deb --info) to examine archive files,\nand dpkg --contents (= dpkg-deb --contents) to list their contents.”, “stderr_lines”: [“dpkg-query: package ‘mysql-server’ is not installed and no information is available”, “Use dpkg --info (= dpkg-deb --info) to examine archive files,”, “and dpkg --contents (= dpkg-deb --contents) to list their contents.”], “stdout”: “”, “stdout_lines”: }

1 Like

Hi @brenton.kreiger

Have you accurately defined version? Have you commented out AWS role?

Before you could run those 2 commands have you run blog based command?

This 3 additional steps have helped me set up the notes without trouble. However you may also enable notes and change urls in the cms.env.json too.

Word of caution: notes works fine only for Chrome browser in desktop/pc and not with mobile device/app

Thank you @Selli - yes I have commented out the AWS role and defined the version as open-release/ironwood.2. See the two screenshots below for that -

Screen Shot 2020-06-10 at 9.21.23 AM

Screen Shot 2020-06-10 at 9.17.11 AM

My final workflow was the following:

  1. set up Oauth for Notes API at the mysite/admin page
  2. set the config parameters in the main.yml file and application parameters in the lms.env.json file. AS WELL AS, define the version.
  3. Comment out the aws role.
  4. Run the 3 role commands from your post above
  5. Run the install command from the blog (step 4) without “-e@/edx/app/edx_ansible/server-vars.yml”
    this is where the error occurs

Would you recommend (or know how to) uninstalling and then going through this process from scratch?

Thank you so much for your help!!!


I am not well versed with uninstalling and start from scratch may be you can open a new post and ask about it this may help others. Moreover you could use --limit parameters with your command followed by the limit file created on failure. This is ansible procedures that helps you ignore the task performed.

One more thing to do would be try

sudo /edx/bin/supervisorctl status and check if notes api is already running in your system or no? Also add mysite:18120 as your allowed host in main.yml file

@Selli, I can’t thank you enough for taking the time to help me here… I’ll probably try the uninstall because the limit command doesn’t work either. I also tried adding mysite:18120 as an allowed host and this doesn’t work. That status command gives the following - so the notes app is installed just not installed correctly… (no process log is created though).

@brenton.kreiger seems uninstalling will work best for you. All the best.

Also I would suggest you to double check your oauth2 clients as trailing / is very important for notes to work

Hi @Melsu I’m getting the No matching distribution found for django-cors-headers==3.4.0 when trying to install Open Edx Notes.

How did you manage to get rid of this error?

Thanks a lot in advance :slight_smile:

Have you tried apt install mysql-server?

I haven’t tried this yet! I’ll let you know if it works.