[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[sumo-user] ImportError: No module named traci (python)
|
Hello,
I'm trying to apply the following commands in python but I always get the error below, (please help)
>>> import os, 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'")
...
>>> sys.path.append(os.path.join('c:', os.sep, 'whatever', 'path', 'to', 'sumo', 'tools'))
>>> import subprocess
>>> PORT=8815
>>> sumoBinary= "/opt/local/bin/sumo-gui"
>>> sumoProcess = subprocess.Popen([sumoBinary, "-c", "/Users/abeerhakeem/Documents/MyResearch/NewMap/NY_lastVersion_MFPS/MFPS/TAPASCologne-0.32.0/cologne6to8.sumocfg", "--remote-port", str(PORT)], stdout=sys.stdout, stderr=sys.stderr)
>>> Loading configuration... done.
>>> PORT=8815
>>> sumoBinary= "/opt/local/bin/sumo-gui"
>>> sumoProcess = subprocess.Popen([sumoBinary, "-c", "/Users/abeerhakeem/Documents/MyResearch/NewMap/NY_lastVersion_MFPS/MFPS/TAPASCologne-0.32.0/cologne6to8.sumocfg", "--remote-port", str(PORT)], stdout=sys.stdout, stderr=sys.stderr)
>>> Loading configuration... done.
>>> import traci
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'traci'
Thanks for the response in advance.
Regard,
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/sumo-user