0

My ubuntu system is 18.04. Anaconda version:anaconda Command line client (version 1.7.2)

I can run "python randomTrips.py" command on my Windows, Then I copy the randomTrip.py file into my ubuntu system, And ran again, there is an error:

traceback (most recent call last):
  File "randomTrips.py", line 523, in <module>
    if not main(get_options()):
  File "randomTrips.py", line 498, in main
    subprocess.call(args2)
  File "/home/dnl/anaconda3/envs/flow/lib/python3.5/subprocess.py", line 247, in call
    with Popen(*popenargs, **kwargs) as p:
  File "/home/dnl/anaconda3/envs/flow/lib/python3.5/subprocess.py", line 676, in __init__
    restore_signals, start_new_session)
  File "/home/dnl/anaconda3/envs/flow/lib/python3.5/subprocess.py", line 1289, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'duarouterD'

Why? Are there any methods?

xiaoToby
  • 1
  • 2
  • What is the `randomTrips.py` file? – math.husky Jul 16 '19 at 18:02
  • Can you do `print(args2)` just before `subprocess.call(args2)` and tell us the result? – math.husky Jul 16 '19 at 18:02
  • The args2 is: args2 ['duarouterD', '-n', 'changsha.net.xml', '-r', 'trips.trips.xml', '--ignore-errors', '--begin', '0', '--end', '2000.0', '--no-step-log', '--no-warnings', '-o', 'changsha.rou.xml'] – xiaoToby Jul 17 '19 at 00:32
  • the introduction url to randomTrips is that: https://sumo.dlr.de/wiki/Tools/Trip – xiaoToby Jul 17 '19 at 00:34
  • Well I don't know what duarouter is but you probably have to install it on Linux as well. Windows could file the `duarouterD`, but Linux can't so you probably don't have that installed, or not specified in your PATH variable (Google that if you don't know what it is!) – math.husky Jul 17 '19 at 04:11
  • Well,because I followed the install instruction on the website of flow, and test it which is no problem. Is there any difference between : sumo binaries (installed by following scripts/setup_sumo_ubuntu1804.sh) and sumo(installed from the official website fo sumo).?? and i checked the contents of sumo_binaries there are just few things. So your advice is I need to install sumo from the official website of sumo? @nathanlct – xiaoToby Jul 17 '19 at 06:26
  • There are some codes from randomTrips.py: import sumolib # noqa from sumolib.miscutils import euclidean # noqa DUAROUTER = sumolib.checkBinary('duarouter') So I searched the 'sumolib' on my computer, i can find it on that directory:/home/xxx/anaconda3/envs/flow/lib/python3.5/site-packages/sumolib. It is looks strange, I cannot understand it. @nathanlct – xiaoToby Jul 17 '19 at 06:27
  • Ok, I installed sumo again, from the flow website, i followed the "Direct install of SUMO from GitHub", and the path is no problem, i still face the same problems:FileNotFoundError: [Errno 2] No such file or directory: 'duarouterD': 'duarouterD – xiaoToby Jul 17 '19 at 07:14

0 Answers0