Installation on fedora failed

Asked by pgfree

Hi,

I'm interested in you nice piece of code, but when I want to install the software, compilation stop with :

  File "/usr/lib/python2.5/site-packages/m210/pegatech.py", line 439
    with open(svgpath, "w") as svgfile:
            ^
SyntaxError: invalid syntax

And if I try to run the daemon :

[root@bipbip python-m210-0.3]# /usr/bin/m210d
  File "/usr/bin/m210d", line 21
    from __future__ import print_function
SyntaxError: future feature print_function is not defined

I tryed to install python 2.7 but same error occurs.

Could you help me ? I'm working on fedora.

Regards

Question information

Language:
English Edit question
Status:
Answered
For:
m210 Edit question
Assignee:
a Edit question
Last query:
Last reply:
Revision history for this message
a (tuomasjjrasanen) said :
#1

Hi!

It seems that you're running older Python than 2.6. M210 is currently developed for 2.6+.

What does python --version print?

However, Python 2.7 should work well, it's backwards compatible with 2.6. When you tried to run it with Python 2.7, are you sure you really executed 2.7. If you have multiple versions of Python installed on your system, it's probably better to explicitly run executable named python2.7:

python2.7 /usr/bin/m210d

or

change the first line (shebang) of m210 executables to #!/usr/bin/env python2.7

or

redirect /usr/bin/python (symlink) to python2.7 executable

(Perhaps I should make few changes, and make m210 Python 2.5 compatible in the next release.)

Can you help with this problem?

Provide an answer of your own, or ask pgfree for more information if necessary.

To post a message you must log in.