Hello, the correct solution would be to declare the environment variable SUMO_HOME to point to the diretory which contains the 'tools' directory. This is rather simple if you use a check-out or download the files directly from sourceforge. If you use the RPM, files are scattered in a way that precludes a reasonable definition of SUMO_HOME (which is something we intend to fix soon). Did you use the RPM? regards, Jakob
2014-02-15 Scott Carpenter <[email protected]>: > Hi. > I am (extremely!) new to SUMO. In trying to get the 0.19.0 tutorials to > work (Fedora 20), I notice that TraCI4TrafficLights works fine but > CityMobil gives "ImportError: no module named Traci !!!!". If I copy the > following code from TraCI4TrafficLights/runner.py and put in ahead of the > import traci statement in CityMobil/vehicleControl.py, then I can get > CityMobil to work. > > > # we need to import python modules from the $SUMO_HOME/tools directory > try: > sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', > '..', '..', "tools")) # tutorial in tests > sys.path.append(os.path.join(os.environ.get("SUMO_HOME", > os.path.join(os.path.dirname(__file__), "..", "..", "..")), "tools")) # > tutorial in docs > from sumolib import checkBinary > except ImportError: > sys.exit("please declare environment variable 'SUMO_HOME' as the root > directory of your sumo installation (it should contain folders 'bin', > 'tools' and 'docs')") > > import traci > > Is there a better fix? > > Thanks. SUMO is a fantastic tool, and I'm looking forward to using it to > support my IEEE 802.11p research. > > -- > > Best, > Scott Carpenter > Graduate student (PhD track), NCSU Department of Computer Science > [email protected] > 919-413-5083 > > ------------------------------------------------------------------------------ > Android apps run on BlackBerry 10 > Introducing the new BlackBerry 10.2.1 Runtime for Android apps. > Now with support for Jelly Bean, Bluetooth, Mapview and more. > Get your Android app in front of a whole new audience. Start now. > > http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk > _______________________________________________ > sumo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sumo-devel > ------------------------------------------------------------------------------ Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk _______________________________________________ sumo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sumo-devel
