"Cannot import SUMO" on Windows with SUMO installed

python .\crdesigner\start_gui.py

UserWarning: Unable to import commonroad_dc.pycrccosy, converting static scenario into interactive is not supported!
  f"Unable to import commonroad_dc.pycrccosy, converting static scenario into interactive is not supported!")
WARNING:root:Cannot import SUMO, simulation will not be offered in Scenario Designer

This is on Windows with SUMO installed and the SUMO_HOME and PYTHON_PATH environment variables set exactly like in the installation instructions for Linux, as well as the sumo, sumolib, traci and libtraci pip packages installed.

Is this a Windows-specific issue that right now there is no fix for or am I missing something?

There might be a Windows-related problem with a third-party Python package used in the sumocr package.
Was the installation of sumocr successful?

I got the same warning. I have installed sumocr successfully via pip install sumocr in cmd.
Should I install or change the path of dependency or something else I made wrong?
I would be very appreciative of any possible help.
ps: I also use Windows.

If you just want to use the GUI, you can ignore this warning.

Thank you for the answer! I could open the GUI, then convert the OpenDrive file to CommonRoad successfully. The problem is there is an error (“Cannot import SUMO, simulation will not be offered in Scenario Designer”) occurred when I convert the CommonRoad file to SUMO, which make the conversion fail.

is the commonroad-drivability-checker successfully installed?
which Python version are you using?

I haven’t installed the commonroad-drivability-checker yet. I tried to run the command “pip install commonroad-drivability-checker” in cmd windows. It occurs error belowing:

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for commonroad-drivability-checker
Running setup.py clean for commonroad-drivability-checker
Failed to build commonroad-drivability-checker
Installing collected packages: commonroad-drivability-checker
Running setup.py install for commonroad-drivability-checker … error
error: subprocess-exited-with-error

× Running setup.py install for commonroad-drivability-checker did not run successfully.
│ exit code: 1
╰─> [107 lines of output]

It seems to be a problem regarding third-party libraries and packages depending on commonroad-drivability-checker? Should I follow the installation description from this link, if I only want to use the GUI? : Installation of the Python interface — CommonRoad Drivability Checker 2022.1 documentation (tum.de)

if you just want to use the GUI, you can install it via pip install commonroad-scenario-designer

I follow the guide in README.md · main · tum-cps / Commonroad Scenario Designer · GitLab (lrz.de). That means I installed the commonroad-scenario-designer via pip install commonroad-scenario-designer; I installed SUMO on my Windows; I changed the SUMO_HOME and PYTHON_PATH environment variables set follow the guide.
I use Python 3.10.4 and SUMO 1.13.0.
After all preparation above, I open the GUI by “python crdesigner/start_gui.py”. Then the follwing warning occurs in cmd window:

UserWarning: Unable to import commonroad_dc.pycrccosy, converting static scenario into interactive is not supported!
warnings.warn(
WARNING:root:Cannot import SUMO, simulation will not be offered in Scenario Designer

Then I try to convert the commonRoad into SUMO via the GUI interface, the error occurs in cmd window:

UserWarning: Cannot import SUMO, simulation will not be offered in Scenario Designer!
warnings.warn(“Cannot import SUMO, simulation will not be offered in Scenario Designer!”)

Can you try SUMO 1.12.0?
Depending on the IDE you use, it could be that the environment-variables are not visible (at least for me this is the case with PyCharm under Ubuntu).

I tried with SUMO 1.12.0, but the problem remains the same.
I try to use Ubuntu to install the toolbox again now. May I ask which Ubuntu version and Python version you use to test it?

I’m using Ubuntu 22.04 and Python 3.10. Have you tried to execute the conversion manually from command line, e.g., the example script or the test cases?

Thank you so much for your answer and help! The error is gone after I change to use Ubuntu. :smile: It seems it is an environment variable problem on my Windows OS, since I did the same thing to install both on Windows and Ubuntu.