Hi,
while trying to install a python program (Trelby) on Alpine Linux, I get the following error message:
$ sudo python setup.py install
File "setup.py", line 40
print(line, end=' ')
^
SyntaxError: invalid syntax
Could anyone shed some light as to what the code error is and how could i fix it?
Thanks.
You get that message because you use Python 2 which is now over end of life👻
In command line test
python3 -V
and
pip3 -V
.
If not install look at
Apk add python3 py3-pip in Alpine.
(Jan-07-2021, 03:00 AM)snippsat Wrote: [ -> ]You get that message because you use Python 2 which is now over end of life👻
In command line test python3 -V
and pip3 -V
.
If not install look at Apk add python3 py3-pip in Alpine.
Hi,
Thanks for the prompt reply.
I removed python2 and installed python3 and py3-pip.
Then I ran $ sudo python3 setup.py install, and everything seemed to go fine, no error messages.
However, when I launched Trelby from the command line, I got another error:
$ /opt/trelby/bin/trelby
File "/opt/trelby/bin/trelby", line 3
import sys
^
IndentationError: unexpected indent
I checked the file /opt/trelby/bin/trelby which is like
#!/usr/bin/python3
import sys
# The following line is modified at installation time by setup.py so it
# points to the actual modules installation path.
sys.path.insert(0, "/opt/trelby//src")
import trelby
trelby.main()
Now, I know nothing about Python, but I noticed that the path /opt/trelby//src has two // before src, which seems odd to me.