carla-simulator / scenario_runner

Traffic scenario definition and execution engine
https://carla-scenariorunner.readthedocs.io/en/latest/
MIT License
521 stars 358 forks source link

Running scenario runner on windows #1013

Open WheelWil opened 1 year ago

WheelWil commented 1 year ago

I am trying to verify if scenario runner runs by "python scenario_runner.py --help" or "python scenario_runner.py --vers", I am getting this:

(carlaSim) C:\ws\913\WindowsNoEditor\scenario_runner>python scenario_runner.py --vers Traceback (most recent call last): File "scenario_runner.py", line 37, in from srunner.scenarioconfigs.openscenario_configuration import OpenScenarioConfiguration File "C:\ws\913\WindowsNoEditor\scenario_runner\srunner\scenarioconfigs\openscenario_configuration.py", line 24, in from srunner.tools.openscenario_parser import OpenScenarioParser, ParameterRef File "C:\ws\913\WindowsNoEditor\scenario_runner\srunner\tools\openscenario_parser.py", line 26, in from srunner.scenariomanager.scenarioatomics.atomic_behaviors import (TrafficLightStateSetter, File "C:\ws\913\WindowsNoEditor\scenario_runner\srunner\scenariomanager\scenarioatomics\atomic_behaviors.py", line 32, in from agents.navigation.basic_agent import BasicAgent, LocalPlanner File "C:\ws\913\WindowsNoEditor\PythonAPI\carla\agents\navigation\basic_agent.py", line 14, in from shapely.geometry import Polygon File "C:\Users\user\AppData\Roaming\Python\Python37\site-packages\shapely\geometry__init.py", line 4, in from .base import CAP_STYLE, JOIN_STYLE File "C:\Users\user\AppData\Roaming\Python\Python37\site-packages\shapely\geometry\base.py", line 19, in from shapely.coords import CoordinateSequence File "C:\Users\user\AppData\Roaming\Python\Python37\site-packages\shapely\coords.py", line 8, in from shapely.geos import lgeos File "C:\Users\user\AppData\Roaming\Python\Python37\site-packages\shapely\geos.py", line 154, in _lgeos = CDLL(os.path.join(sys.prefix, 'Library', 'bin', 'geos_c.dll')) File "C:\Users\user.conda\envs\carlaSim\lib\ctypes\init.py", line 364, in init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 126] The specified module could not be found

ravivaghasiya1998 commented 1 year ago

pip uninstall shapely pip install shapely

try to uninstall shapely and reinstall it. This solution worked for me

WheelWil commented 1 year ago

Thank you for the solution! :)

jmoss7 commented 5 months ago

pip uninstall shapely pip install shapely

try to uninstall shapely and reinstall it. This solution worked for me

Thank you SO much @ravivaghasiya1998 , I have been trying to get Scenario Runner to work for multiple DAYS, and this finally made it work. Thank you thank you thank you 🙏

Turuu1124 commented 1 month ago

thank you, been stuck trying to make it work for days now