ModuleNotFoundError: No module named 'commonroad_dc'

Hi,
when running the “tutorial informed search” notebook, I get an error “ModuleNotFoundError: No module named ‘commonroad_dc’”. I know that there are similar errors but they occurred with “commonroad_dc.pycrcc” so not exactly the same and the tips there did not help me.

Additionally, when following the installation guide, I get an error after the “Script Installation” step with " ./build.sh -w -i"

Could someone help me out?
Thanks already.

Attached is the error after the “Script installation”

Dear ga84fer,

Which operating system are you using? Boost seems to be not completely installed (not all required components) or to be outdated.

The universal solution would be installing and building boost from source.
https://www.boost.org/users/download/

Could you please tell me what your OS version is so that I could check if there is an easier way of installing a modern version of boost on your machine (using a package manager)?

@vitalii_rusinov Thanks for the comment, I will try that! I am working on macOS (Monterey with M1 Chip)

Best
Magnus

We have no Mac computer with the M1 chip at the Chair but the library builds fine on macOS Catalina and Monterey with the intel chip.

Compiling boost from source could solve this particular problem. But there could be other problems on the M1 cpu: we are not entirely certain that all python packages are available for the M1 chip. Please let us know how it goes.

I was not able to solve it yet. I built boost from source but it did not solve the issue. But I am probably not the only one with M1. I will try to redo the whole installation guide to see if an error occured somewhere else.

brew seems to have the correct version of boost for apple silicon so you don’t have to build boost manually.

Could you possibly check manually whether /usr/local/include/boost has the file foreach.hpp ?

You should not repeat all the steps, just the steps for installing the drivability checker:

brew install cmake eigen boost libomp
conda activate your_environment_name
./build.sh -j 8 -i

because they are independent from all other steps. In addition, build.sh always cleans up temp files before the new build.
It is not immediately clear to me if the boost is installed into the correct folder or if it is not picked up due to some apple m1 build peculiarities. It depends on whether there is the file foreach.hpp in the folder /usr/local/include/boost.

Could you possibly run

ls -la /usr/local/include/boost > output1.txt
./build.sh -j 8 -i > output2.txt

and send the files output1.txt and output2.txt to ge56cug@mytum.de for further inspection?

There are two other options for macOS (docker container and virtual machine).

This is confirmed. Drivability Checker can currently not be built on macOS on m1 CPU. The docker version should possibly work fine.

Magnus and I could try to make it compatible with apple silicon this week. Drivability Checker could probably be made to support apple silicon, but I’m not certain if all necessary python packages are available for apple silicon.

If you have an apple m1 cpu, you could try to use docker instead of installing commonroad-search directly. There is no guarantee the docker image would work on m1 silicon but it is possible that it will. Many intel-based docker images do work on m1 silicon.

The reason why it does not build on m1-based macOS is related to the fact that homebrew under this operating system has different include and library paths for m1 silicon and for intel silicon. The two directions we would try are as follows.

  • Use a binary wheel built on an intel-based mac machine through Rosetta2 installing it with Anaconda python 3.8.
  • Build the library natively for m1 silicon (arm64 architecture) after its modifications and check if all the required python dependencies are available in the special version of miniforge for m1 silicon (python 3.9).

One way to go (for Apple computers with the newest M1 arm64 CPU) is:

One could quickly install ubuntu with this tool and then follow the commonroad search installation steps for Ubuntu.

Remote debugging with PyCharm could be possible via ssh.

Hi, I just met the same problem with command ./build.sh -w .i, using Apple silicon. If there is an update for installation? I have also tried docker and Ubuntu system (Arm64) based on the platform UTM, these don’t work.
Thanks:)

As shown in the picture, the Ubuntu of multipass is also based on arm64, so I think it couldn’t work either.

Hi ge32vez,

I do have a working solution for apple m1. Please send an email to ge56cug@mytum.de so that I could send it to you. ga84fer confirmed that it works.

Hi,
@ga84fer did this solution work for you? I have the same problem with M1, Docker and the VM also dont work.
Thank you!

Hi ge26kom,

I sent the python wheel to 6 users with Apple M1 CPU, all six confirmed that it worked. I also received one like to a post in this thread.