Having trouble running the examplary scripts of commonroad-reach

I followed the instructions to install the python package via pip in your Conda environment:
I just created a conda env pytho=3.7, and pip install commonroad-reach,
then I tried the exemplary scripts compute_reachable_set.py, then the following error pops out:

Traceback (most recent call last):
File “compute_reachable_set.py”, line 3, in
from commonroad_reach.data_structure.configuration_builder import ConfigurationBuilder
File “/home/uwu/CommonRoad/commonroad-reach/commonroad_reach/data_structure/configuration_builder.py”, line 9, in
from commonroad_reach.data_structure.configuration import Configuration
File “/home/uwu/CommonRoad/commonroad-reach/commonroad_reach/data_structure/configuration.py”, line 15, in
from commonroad_reach import pycrreach
ImportError: cannot import name ‘pycrreach’ from ‘commonroad_reach’ (/home/uwu/CommonRoad/commonroad-reach/commonroad_reach/init.py)

Hi,

are you sure your conda evnironment is activated? It seems that the python intepreter is looking to import from the path of your cloned commonroad-reach repo, instead of looking in the site-packages directory of your conda environment.

Best, Gerald

Or perhaps you could run the scripts while being out of that directory. It picks up the wrong folder for commonroad_reach (/home/uwu/CommonRoad/commonroad-reach/commonroad_reach/) because you were in the folder /home/uwu/CommonRoad/commonroad-reach when running the scripts.

Thank you for your help, the problem is solved.