Python Forum
python setup.py install error
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
python setup.py install error
#1
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.
Reply
#2
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.
Reply
#3
(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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  error trying to install sslstrip NullAdmin 1 796 Mar-11-2021, 09:37 PM
Last Post: buran
  VSCode Setup and configuring to run with Python apollo 2 820 Jan-13-2021, 04:55 PM
Last Post: jefsummers
  Python Idlex setup robsuttonjr 3 514 Jan-09-2021, 09:54 PM
Last Post: Gribouillis
  'python setup.py bdist' gets error on 'compiler_flags' 1780yz 0 688 Sep-02-2020, 09:17 PM
Last Post: 1780yz
  trying to pip install stasm module getting error djf123 3 1,590 Jul-26-2020, 05:00 AM
Last Post: millpond
  pip install -e ., ERROR: Failed building wheel for pyfarmhash mostafaPython 1 2,260 Jun-09-2020, 08:24 PM
Last Post: mcmxl22
  "pip install -e ." returns : ERROR: Command errored out with exit status 1 mostafaPython 3 2,129 Jun-09-2020, 09:28 AM
Last Post: snippsat
  pip install musicplayer error Kumarkv 4 1,809 May-20-2020, 08:31 PM
Last Post: Larz60+
  REGEX Install Error in PyCharm charlesauspicks 1 1,048 May-14-2020, 08:10 PM
Last Post: buran
  Python to setup samuelbachorik 2 800 Apr-19-2020, 11:19 AM
Last Post: samuelbachorik

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020