pythonsumotraffic-simulation

Sumo sumo-osmWebWizard


I'm running Sumo on a MacBook Air OSX 10.9.5 (Mavericks). I'm trying to use sumo-osmWebWizard to import data from Open Street Map but it doesn't seem to work. This is the message I get when I try to run the script:

Lorenzos-MacBook-Air:~ lorenzo$ $SUMO_SCRIPTS/sumo-osmWebWizard    
Traceback (most recent call last):

  File "/opt/local/bin/sumo-osmWebWizard", line 39, in <module>
    import osmGet
ImportError: No module named osmGet

By the way, SUMO_SCRIPTS is a variable I've set to the following:

Lorenzos-MacBook-Air:~ lorenzo$ echo $SUMO_SCRIPTS
/opt/local/bin

When I type "which python" to the terminal, this is what I get:

Lorenzos-MacBook-Air:~ lorenzo$ which python
/usr/bin/python

When I type "python --version" to the terminal, this is what I get:

Lorenzos-MacBook-Air:~ lorenzo$ python --version
Python 2.7.5

Also, I'm running Sumo on MacPorts, and I think this error has something to do with the $PATH variable of this environment. This is how the PATH variable is set up:

    Lorenzos-MacBook-Air:~ lorenzo$ echo $PATH
 /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin

Solution

  • Assuming you used this portfile, I would say it is broken. Please try to install sumo using homebrew. The problem is that the portfile tries to distinguish between python files used as executable scripts and files used as function libraries and osmGet.py is used as both. One could try to add it to the relevant list python_libs in the portfile but the way it is installed does not make me confident that it will be picked up correctly and I do not have a Mac to check.