kuanb / peartree

peartree: A library for converting transit data into a directed graph for sketch network analysis.
MIT License
201 stars 23 forks source link

Syntax error in parallel.py when importing peartree #117

Closed doman84 closed 5 years ago

doman84 commented 5 years ago

Hi,

I have this kind of error after using import peartree as pt

  File "C:\anaconda2\lib\site-packages\peartree\parallel.py", line 18
    target_time_start: int,
                     ^
SyntaxError: invalid syntax

Looks like some very basic problem, but I'm not very well in python :)

kuanb commented 5 years ago

Thanks @doman84 for your question. Please also include your version of Python. peartree uses type annotations, and this not supported in earlier versions of Python 3, as well as Py2.

You can see release notes re: type annotations, here: https://docs.python.org/3/whatsnew/3.6.html

kuanb commented 5 years ago

Here's a StackOverflow question with more discussion that may assist you: https://stackoverflow.com/questions/51203670/syntaxerror-invalid-syntax-with-variable-annotation

doman84 commented 5 years ago

Ok, sorry for that. I miss information that 3.6 version of Python is needed :)

Anyway - great job with this project. I'm one of the leaders of great group influencing on public transport in biggest polish metropolis. Generally our activities are mainly happenings, but we try do the analysis as well and all kind of tools help us a lot.

kuanb commented 5 years ago

Thanks, please feel free to leave any additional questions as you perform your analysis. Happy to help. :)