python setup.py install error - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: python setup.py install error (/thread-31864.html) |
python setup.py install error - blackclover - Jan-07-2021 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. RE: python setup.py install error - snippsat - Jan-07-2021 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. RE: python setup.py install error - blackclover - Jan-07-2021 (Jan-07-2021, 03:00 AM)snippsat Wrote: You get that message because you use Python 2 which is now over end of life👻 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. |