Failed to install tutor version for Maple on ubuntu 24.04 (python 3.12.3)

I have ubuntu 24.04 with python 3.12.3, I wanted to install the tutor version that corresponds to Maple, for that I ran:

python3 -m venv maple
source maple/bin/activate
pip install 'tutor[full]>=13.0.0,<14.0.0'

but the pip command ends with the error:

Building wheels for collected packages: tutor-license
  Building wheel for tutor-license (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for tutor-license (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [29 lines of output]
      /tmp/pip-build-env-of72tw6d/overlay/lib/python3.12/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
      !!
      
              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:
      
              License :: Other/Proprietary License
      
              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************
      
      !!
        self._finalize_license_expression()
      running bdist_wheel
      running build
      running build_py
      creating build/lib.linux-x86_64-cpython-312/tutorlicense
      copying tutorlicense/__init__.py -> build/lib.linux-x86_64-cpython-312/tutorlicense
      copying tutorlicense/__about__.py -> build/lib.linux-x86_64-cpython-312/tutorlicense
      copying tutorlicense/plugin.py -> build/lib.linux-x86_64-cpython-312/tutorlicense
      running build_ext
      building 'tutorlicense.cmd' extension
      creating build/temp.linux-x86_64-cpython-312/tutorlicense
      x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -I/home/dafna/maple/include -I/usr/include/python3.12 -c tutorlicense/cmd.c -o build/temp.linux-x86_64-cpython-312/tutorlicense/cmd.o
      tutorlicense/cmd.c:210:12: fatal error: longintrepr.h: No such file or directory
        210 |   #include "longintrepr.h"
            |            ^~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for tutor-license
Failed to build tutor-license
ERROR: Could not build wheels for tutor-license, which is required to install pyproject.toml-based projects


I guess installing tutor for maple is not maintained anymore for higher version of python or something like that? any suggestions on how to solve that?

Thank you

I think for a version of Tutor as old as Maple (v13.x) you may want to use a much older release of Python, probably 3.8. If my memory serves me right I think I was running my site on 3.10 back then but that was a while back, i could be mistaken. As far as I’m aware Python 3.11/12 support was only around the Redwood/Sumac era approximately (v18/v19).

Is there a special reason you want to run such an outdated version of Tutor, or are you just trying to get an old instance updated in a new environment?

Looks like Tutor 13 was developed against Python 3.8: tutor/requirements/base.txt at 7c157eccd5f0dba69b023e3dd64ed12ce6cbeaa4 · overhangio/tutor · GitHub

Hi, thanks for the answer. I was able to install the tutor for Maple using python 3.10.12.

I am new to openedx/tutor. We currently have Maple version on production. I am trying to reproduce the production environment on my local machine in order to develope some plugins. Now with tutor 13.3.2 installed I am not able to run the local launch command, I get the error

Error: No such command 'launch'.

the launch command was introduced as of Tutor v15, so for any version up to (and including) 14.2.3 you’ll use quickstart instead - see: tutor/README.rst at v13.3.1 · overhangio/tutor · GitHub

For what it’s worth, you may want to consider upgrading your Tutor instance, considering how old v13 is. Since you’re setting up a new server with a backup of your current server this is a great opportunity to test the upgrade procedures without interrupting your current live server, perfect to gain familiarity over the process, plus you’ll be able to take advantage of all the new features and security updates that have been introduced over the years since then.
For context the current version 20 is approaching EOL in December this year, following which Ulmo v21 will be the current version: Open edX Release Schedule

This post here might give you a little more context around the upgrade procedure: Migrate databases between tutor platforms - #9 by joel.edwards (most of the topic is not relevant to you, but the upgrade examples i gave in the last reply would be)

Hi, thank you. This is indeed our goal, to upgrade the tutor+openedx.

For now I try to reproducce the current production env on my local machine.

I ran tutor local quickstart and it failed with the error: KeyError: 'ContainerConfig' when running docker-comose , (full error log is here: dafna-madrase/quickstart-error.md at master · kamomil/dafna-madrase · GitHub ).

I guess my installed docker also mismatch the old tutor version. I wonder how to solve this. Should I create a docker image with tutor 13.3.2 installed in it and then run tutor local quickstart inside it?

Which version of docker and docker compose are you using?

docker --version
docker compose version

I’m not 100% certain if it’s the same issue but I recall there was a change between docker compose and docker-compose some time around this era. Maybe relevant, hopefully I’m not sending you in the wrong direction though :sweat_smile:

$ docker --version
Docker version 28.3.3, build 980b856
$ docker compose version
Docker Compose version v2.39.1-desktop.1

Just had a look at Docker’s APT repository for Noble (24.04) and it looks like they don’t have packages there for the old versions of docker/compose. Maybe it can be installed from a different release repository but I can’t tell you if that’ll work or not, might be dependencies that have changed and it won’t work

I suspect you’ll need to do this initial setup on an older release of Ubuntu, perhaps 20.04 (Focal) or 18.04 (Bionic). Though I’m not exactly sure about this, it’s been so long since I ran Maple that I have very little recollection of the environment/configs at that time, so unless anyone else can give some exact instructions then this may require a little experimentation on your part…

Maybe check on your live server what OS is running there so you can try to replicate it more closely, then once you have everything working and are able to do some upgrades you can redo the setup on new Ubuntu with a later release of software

To reproduce the setup properly, you may need to look at the production system and find out the versions of the OS, Python, Docker, etc. and use all of those in the development environment.