[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[sumo-user] Problem with using libsumo
|
Hello,
I am trying to run sumo simulation faster so I decided to use libsumo.
I followed the guide to build using cmake.
I have set up the SUMO_HOME.
in SUMO_HOME/tools/libsumo I have libsumo.py (which helps import
_libsumo), the _libsumo.pyd dll and some other stuff.
I have set the PATH to have SUMO_HOME/tools/libsumo. I have also set
PYTHONPATH to SUMO_HOME/tools/libsumo.
I use conda and I have an environment called sumo which uses python
2.7. I have build sumo by following the guide at
https://sumo.dlr.de/wiki/Installing/Windows_CMake (command line) and
having the sumo environment activated during that process. I have
also build as release (Visual Studio 2013 Win64).
I have created a simple script just importing libsumo like so:
import os
import sys
if 'SUMO_HOME' in os.environ:
tools = os.path.join(os.environ['SUMO_HOME'], 'tools')
sys.path.append(tools)
else:
sys.exit("please declare environment variable 'SUMO_HOME'")
from sumolib import checkBinary # noqa
import traci
import sumolib
import libsumo as libs
and I get this error:
Traceback (most recent call last):
File "C:/Users/VR_Lab/source/repos/sumo/tools/libsumo/test.py",
line 14, in <module>
import libsumo as libs
File "C:\Users\VR_Lab\source\repos\sumo\tools\libsumo\libsumo.py",
line 17, in <module>
_libsumo = swig_import_helper()
File "C:\Users\VR_Lab\source\repos\sumo\tools\libsumo\libsumo.py",
line 16, in swig_import_helper
return importlib.import_module('_libsumo')
File
"C:\ProgramData\Anaconda2\envs\sumo\lib\importlib\__init__.py", line
37, in import_module
__import__(name)
ImportError: DLL load failed: The specified procedure could not be found.
This script was called with python 2.7 (having the same conda
environment activated as the one it was build from).
The PYTHONPATH is correctly set to SUMO_HOME/tools/libsumo.
Why does that happen?
I would like to add that in https://sumo.dlr.de/wiki/Libsumo it says
to use the extended package and has a reference to a link but the
referenced package doesn't have any CMakeLists.txt so I can use cmake.
Thank you,
Tom