Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] 答复: SUMO_HOME for Ubuntu package install

 

Here

 

https://github.com/DLR-TS/sumo/blob/master/tests/complex/tutorial/traci_tls/runner.py

 

From the sumo traci example code

 

line number 27 �C 38, these code try to read $SUMO_HOME and append “tools” ,then add the new directory to python’s default search path.

 

More traci example you can find here

 

http://sumo.dlr.de/wiki/TraCI#TraCI_Commands

 

So , $SUMO_HOME is the directory contains  toolsbin .. etc.

 

And  if you don’t want to write the code like 27-38 in every python file, you should add a new environment variable named PYTHONPATH = $SUMO_HOME/tools

 

Then you can just import traci

 

发送自 Windows 10 邮件应用

 

发件人: Moritz Reinhardt via sumo-user
发送时间: 2018126 23:49
收件人: sumo-user
主题: [sumo-user] SUMO_HOME for Ubuntu package install

 

Hello,

I've been building SUMO from source but now I wanted to switch to
using the ubuntu ppa.

Sumo and sumo-gui are working fine, however, I wonder what value I
have to set $SUMO_HOME to. The documentation does not mention this at
all!

The sumo tools (like duarouter) are added to my path in /usr/bin and
work properly so I tried setting $SUMO_HOME to /usr/bin.

But then I cannot import sumolib in python the way I used to because
there's obviously no subfolder /usr/bin/tools and the module is
unknown...

Any help would be appreciated!

Regards,
Moritz

------------------------------------------------------------------------------
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
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user

 


Back to the top