3

I'm trying to install this great python module Python-Chrono to my python environment, but it fails at least with python 2.4.3 and 2.6.6 with the following error message:

Traceback (most recent call last): 
  File "setup.py", line 30, in ?
    import chrono
  File "/home/janne/python-chrono-0.3.0/chrono/__init__.py", line 22
    from . import calendar
         ^
SyntaxError: invalid syntax

The setup is using relative import mechanism and it should work just fine, but in my environment it causes this error.

Is there a way to get this fixed? Have you seen this kind of behaviour in your projects?

4

1 回答 1

6

Python 2.4 不支持该语法 - 它是在 Python 2.5 中引入的。

(您是否 100% 确定它在 2.6 中显示该消息失败?)

于 2010-10-12T12:00:00.813 回答