Hi Tom,
Thanks for helping me. I looked into runner.py and this is what I see:
# 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
I tried commenting out this line:
sys.path.append(os.path.join(os.environ.get("SUMO_HOME", os.path.join(
os.path.dirname(__file__), "..", "..", "..")), "tools")) #
tutorial in docs
and I also tried commenting out the whole block, but it still isn't working
for me. Are these the lines that you were referring?
Thanks!
Evan
On Mon, Oct 19, 2015 at 2:50 PM, Lockhart, Thomas G (398I) <
[email protected]> wrote:
> On Oct 19, 2015, at 12:53 PM, Evan Zheran Liu <[email protected]>
> wrote:
>
> Hi Tom,
>
> Thanks for your help! Specifically what I'm trying to do is follow the
> tutorial given: here
> http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights
>
> I am not sure where to point the environmental variable SUMO_HOME:
>
> rescomp-13-265598:traci_tls Evan$ ls
>
> *data* *embedded.py* *runner.py*
> rescomp-13-265598:traci_tls Evan$ pwd
> /opt/local/share/doc/sumo/tutorial/traci_tls
> rescomp-13-265598:traci_tls Evan$ python runner.py
> please declare environment variable ‘SUMO_HOME' as the root directory of
> your sumo installation (it should contain folders 'bin', 'tools' and 'docs')
>
>
> I was unable to locate any sumo directory that contains bin, tools and
> docs. I've attached the output of "port contents sumo" to this email under
> the file logfile.txt. Any ideas?
>
>
> Ah, right. There are a few changes needed in the source code to get it to
> fit into /opt/local/bin/, /opt/local/lib/ etc to remove the need for
> SUMO_HOME.
>
> In this case, there is a try/except in the runner.py file which has a
> commented-out reference to SUMO_HOME (good) but the line actually extended
> to two lines and the second one caused an error (bad). The only case for
> the except clause warns you to set SUMO_HOME (which is not actually the
> root cause of the problem).
>
> Try modifying runner.py to comment-out the line immediately following the
> one with SUMO_HOME and try again. Let me know if you have additional
> trouble, and I’ll think about how to fix the problem (though it exceeds my
> sed expertise at the moment!).
>
> - Tom
>
>
>
> Thanks!
> Evan
>
> On Mon, Oct 19, 2015 at 10:12 AM, Lockhart, Thomas G (398I) <
> [email protected]> wrote:
>
>> Hi. I’m the maintainer of the sumo port, and the python scripts and
>> libraries are definitely installed.
>>
>> What is the symptom of “lacks python support”? Could it be that you are
>> not finding a particular script? If so, perhaps it would help to know that
>> all of the scripts (over 100 of them) are prefixed with a “sumo-“ to avoid
>> name collisions in /opt/local/bin/. Also, underscores in program names are
>> replaced by dashes for name consistency.
>>
>> “port contents sumo” might help you locate what you need, and will give a
>> clue about where other files such as libraries are placed.
>>
>> hth
>>
>> - Tom
>>
>> On Oct 19, 2015, at 3:31 AM, Evan Zheran Liu <[email protected]>
>> wrote:
>>
>> > Hi,
>> >
>> > I'm running on OS X Mavericks. I installed SUMO using MacPorts using
>> (sudo
>> > port install sumo) but the version that MacPorts gives lacks python
>> support.
>> >
>> > I downloaded the src code in the sumo-src-0.24.0.tar.gz, and extracted
>> the
>> > files. I'm trying to run the configure script, but I keep running into
>> this
>> > issue:
>> >
>> > rescomp-13-265598:sumo-0.24.0 Evan$ ./configure --with-python
>> > checking build system type... x86_64-apple-darwin13.4.0
>> > checking host system type... x86_64-apple-darwin13.4.0
>> > checking target system type... x86_64-apple-darwin13.4.0
>> > checking for a BSD-compatible install... /usr/bin/install -c
>> > checking whether build environment is sane... configure: error: unsafe
>> > absolute working directory name
>> >
>> > Can anybody help me out here to configure SUMO? Thanks for your help!
>> >
>> > Best,
>> > Evan
>> >
>> ------------------------------------------------------------------------------
>> > _______________________________________________
>> > sumo-user mailing list
>> > [email protected]
>> > https://lists.sourceforge.net/lists/listinfo/sumo-user
>>
>>
> <logfile.txt>
>
>
>
------------------------------------------------------------------------------
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user