[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [sumo-user] Problem with using libsumo
|
Hello Tom,
using Python 3 is definitely the right thing to do because libsumo only
works with Python3. Concerning the error it seems that the configure
step already fails because it is looking for pthread.h and does not find
it. Which cmake version do you use? And did you clone SUMOLibraries?
Best regards,
Michael
Am 2019-04-16 23:39, schrieb cchadj01@xxxxxxxxxxxx:
Hello,
I am happy to learn that sumo 1.2.0 was released with cool new
features and bug fixes.
I tried to install sumo v1.2.0 again using cmake so I can use
libsumo. This time I decided to use python version 3.7
and for this reason I created a conda environment that uses python
3.7. Having this environment activated the python.exe is in path and
so when using cmake correctly configures the python to desired
executable.
SUMO_LIBRARIES were correctly set up in PATH. I changed the
SUMO_HOME to the newly downloaded directory.
I have the PYTHONPATH=%SUMO_HOME%/tools/libsumo;%SUMO_HOME%/tools/%
and the PATH to point to these directories as-well.
I have attached the CMakeCache.txt. Also attached you can find
CMakeOutput.log and CMakeError.log
I have again tried to import libsumo but it did't work. Attached you
can find an image with the error.
Thank you,
Tom.
Quoting cchadj01@xxxxxxxxxxxx:
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
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or
unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/sumo-user