No module named ‘commonroad_dc.pycrcc’

I know this sounds like an exact replica of an already existing post, but i would not be posting this if i knew better… or i am just stupid idk:

When executing the tutorials i stumbles upon this error stack:
It was from the tutorial Informed Search Algorithms (but the same error occurred with uninformed search)

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-173606270f03> in <module>
     18 from commonroad.visualization.draw_dispatch_cr import draw_object
     19 
---> 20 from SMP.motion_planner.motion_planner import MotionPlanner
     21 from SMP.maneuver_automaton.maneuver_automaton import ManeuverAutomaton
     22 from SMP.motion_planner.utility import plot_primitives, display_steps

~/**/**/**/**/**/commonroad-search/tutorials/1_search_algorithms/../../SMP/motion_planner/motion_planner.py in <module>
      8 from SMP.maneuver_automaton.maneuver_automaton import ManeuverAutomaton
      9 # iterative search algorithms
---> 10 from SMP.motion_planner.search_algorithms.sequential_search import BreadthFirstSearch
     11 from SMP.motion_planner.search_algorithms.sequential_search import DepthFirstSearch
     12 # best first search algorithms

~/**/**/**/**/**/commonroad-search/tutorials/1_search_algorithms/../../SMP/motion_planner/search_algorithms/sequential_search.py in <module>
     10 from SMP.motion_planner.utility import MotionPrimitiveStatus, initial_visualization, update_visualization
     11 from SMP.motion_planner.queue import FIFOQueue, LIFOQueue
---> 12 from SMP.motion_planner.search_algorithms.base_class import SearchBaseClass
     13 
     14 

~/**/**/**/**/**/commonroad-search/tutorials/1_search_algorithms/../../SMP/motion_planner/search_algorithms/base_class.py in <module>
     21 from commonroad.scenario.trajectory import State
     22 from commonroad.scenario.trajectory import Trajectory
---> 23 from commonroad_dc.boundary import boundary
     24 from commonroad_dc.collision.collision_detection.pycrcc_collision_dispatch import create_collision_checker, \
     25     create_collision_object

~/anaconda3/envs/commonroad-py37/lib/python3.7/site-packages/commonroad_drivability_checker-2020.1-py3.7-linux-x86_64.egg/commonroad_dc/boundary/boundary.py in <module>
      3 
      4 # commonroad-boundary
----> 5 from commonroad_dc.boundary import construction
      6 
      7 

~/anaconda3/envs/commonroad-py37/lib/python3.7/site-packages/commonroad_drivability_checker-2020.1-py3.7-linux-x86_64.egg/commonroad_dc/boundary/construction.py in <module>
     11 from commonroad.scenario.trajectory import State
     12 
---> 13 import commonroad_dc.pycrcc as pycrcc
     14 from commonroad_dc.boundary import triangle_builder, lanelet_bounds, scenario_bounds
     15 from commonroad_dc.collision.visualization.draw_dispatch import draw_object

ModuleNotFoundError: No module named 'commonroad_dc.pycrcc'
1 Like

I had the same problem and wasted a whole day to try to get it running with Anaconda and PyCharm. In the end I always got the same message as you. I deleted and reinstalled the whole project multiple times and nothing helped.

I suggest you just do it using Docker and the Jupyter Notebook code editor, that’s the way I did it and I think it causes the least of a headache. You are not able to debug as efficiently tho

1 Like

Doesn’t PyCharm have built in docker support? I thought that would enable you to work and debug just as if you were not using docker.

Did you try installing on Ubuntu 18.04? Or another OS?

Did you try installing on Ubuntu 18.04? Or another OS?

hi, got the same issue than evilpoke and the other guys before. I tried to go with 3 different python versions and all the other suggestion from the other posts. The Module pycrcc is still missing. I´ve tried with all installation options but only “python setup.py install” went good:

Finished processing dependencies for commonroad-drivability-checker==2021.1

The other installations didnt came that far.

So i had a look to the git repository and for me the file “pycrcc.cpython-37m-darwin.so” is missing. Is there maybe an issue in the git repository? Is there an easy way to implement the file “pycrcc.cpython-37m-darwin.so” to the commonroad_dc folder?

Using Ubuntu 20.04, Miniconda3, Python 3.9.4

Hi, did you use the bash script (build.sh) for installation? If the file “pycrcc.cpython-37m-darwin.so” this usually means that the build was not successful.

A quick sidenote: The updated documentation for version 2021.1 of the drivability checker should be available on the website tomorrow.

thanks for the fast reply, and i tried again with the bash installation option. The bash script has built the environment as well successful:
Finished processing dependencies for commonroad-drivability-checker==2021.1
Done!

When i try to do the first tutorial of the commonroad-drivability-checker, the import of commonroad_dc.pycrcc causes the error again. The module pycrcc is still missing.

Hi, did you add the root folder of the drivability checker to your PYTHONPATH, so that the module commonroad_dc is found? E.g., if you are using PyCharm as an IDE you can do this in Settings -> Python Interpreter.

Best,
Gerald

yes i did. I’m wondering that init.py in the rootfolder of dc is empty!?

worked for me with sudo bash. Ok thanks a lot for helping me.

It seems I have encountered similar problem?

I have already put the following 3 folders’ address to PATH
commonroad-search
commonroad-route-planner
commonroad-drivability-checker

BTW, when setting up, there are 2 blocks with only Ubuntu/MacOS instructions, since I am using Win10, so I just skip them.(see below)

"We install Imagemagick (required for saving GIF animations of solutions) with the following commands:

# Ubuntu
$ sudo apt-get install imagemagick imagemagick-doc -y

# MacOS
$ brew install imagemagick"

AND

“Script Installation
# Ubuntu
$ bash build.sh -w -i

# MacOS
$ brew install cmake eigen boost libomp
$ ./build.sh -w -i

Manual Installation
# Ubuntu
$ sudo apt-get install libboost-dev libboost-thread-dev libboost-test-dev libboost-filesystem-dev libeigen3-dev
$ git submodule update --init
$ pip install -v . --use-feature=in-tree-build

# MacOS
$ brew install cmake eigen boost libomp
$ git submodule update --init
$ pip install -v . --use-feature=in-tree-build”

I am not sure whether they are related with this error.
Hope someone will know it. Thanks in advance.


---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-1-b0017dad8eb1> in <module>
     18 from commonroad.visualization.mp_renderer import MPRenderer
     19 
---> 20 from SMP.motion_planner.motion_planner import MotionPlanner
     21 from SMP.maneuver_automaton.maneuver_automaton import ManeuverAutomaton
     22 from SMP.motion_planner.utility import plot_primitives, display_steps

G:\Anaconda3_Env\commonroad-py37\commonroad-search\tutorials\1_search_algorithms\../..\SMP\motion_planner\motion_planner.py in <module>
      8 from SMP.maneuver_automaton.maneuver_automaton import ManeuverAutomaton
      9 # iterative search algorithms
---> 10 from SMP.motion_planner.search_algorithms.sequential_search import BreadthFirstSearch
     11 from SMP.motion_planner.search_algorithms.sequential_search import DepthFirstSearch
     12 # best first search algorithms

G:\Anaconda3_Env\commonroad-py37\commonroad-search\tutorials\1_search_algorithms\../..\SMP\motion_planner\search_algorithms\sequential_search.py in <module>
      9 from SMP.motion_planner.plot_config import DefaultPlotConfig
     10 from SMP.motion_planner.queue import FIFOQueue, LIFOQueue
---> 11 from SMP.motion_planner.search_algorithms.base_class import SearchBaseClass
     12 from SMP.motion_planner.utility import MotionPrimitiveStatus, initial_visualization, update_visualization
     13 

G:\Anaconda3_Env\commonroad-py37\commonroad-search\tutorials\1_search_algorithms\../..\SMP\motion_planner\search_algorithms\base_class.py in <module>
     21 from commonroad.scenario.trajectory import State
     22 from commonroad.scenario.trajectory import Trajectory
---> 23 from commonroad_dc.boundary import boundary
     24 from commonroad_dc.collision.collision_detection.pycrcc_collision_dispatch import create_collision_checker, \
     25     create_collision_object

ModuleNotFoundError: No module named 'commonroad_dc'

Hi ge26mox,

It is not currently possible to build drivability checker on windows. Windows 10 and windows 11 users should use docker (or the virtual machine) for the exercise instead. It is possible to use the virtual machine on windows 8 and earlier. The Docker image and the virtual machine disk are provided in the tum-cps/commonroad-search git repository.

Building under windows directly would require major changes.

2 Likes

Thank you so much for the information!