No module named 'lms.envs.tutor.development' when trying to run tutor dev launch on macOS

Hi! me and my team started facing this problem this week on our dev environments on macOS:

When trying to launch the platform in dev mode, while having latest openedx-platform master mounted in tutor, we were seeing the following error on lms and cms containers, and during the init process:

ModuleNotFoundError: No module named ‘lms.envs.tutor.development’

We traced it down to the following bind-mounts not being really mounted (docker showed them as mounted, but when getting into the container image and doing an ls, they were empty):

/openedx/edx-platform/lms/envs/tutor
/openedx/edx-platform/cms/envs/tutor

How to work around the issue:

In Docker Desktop settings, change the file sharing implementation to “gRPC FUSE“:

This fixed the error.

Previously, VirtioFS was selected, and used to work correctly, this may be a bug on the docker side, but for now, changing it to gRPC FUSE allows us to continue working.

Hope this helps!

4 Likes

I noticed that the tutor build command was using Python 3.11.x and the latest dependencies require Python 3.12.x to run. The tutor env has 3.12.2 available so building with that Python version fixed the issue for me:

tutor images build openedx-dev --no-cache --build-arg PYTHON_VERSION=3.12.2

Using the --no-cache flag will force Docker to rebuild the base images from scratch and the --build-arg PYTHON_VERSION=3.12.2 will force the image to build with the correct Python version.