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
  Install error middlestudent 1 711 Sep-23-2023, 08:26 AM
Last Post: middlestudent
  wxPython install error carlomscalisi 3 3,544 Jan-17-2023, 11:04 AM
Last Post: snippsat
  Error with pip install coffeeguy 1 2,207 Sep-08-2022, 01:27 AM
Last Post: snippsat
  kmeans install error (please help me) muratuzun 3 5,330 May-06-2022, 02:14 PM
Last Post: snippsat
  Install location setup new default Droidling 2 1,188 Apr-22-2022, 03:45 AM
Last Post: Droidling
  Setup Portable Python on Windows for script starts with double clicks? pstein 0 1,778 Feb-18-2022, 01:29 PM
Last Post: pstein
  Install any library via pip get an error cannot import name 'SCHEME_KEYS' from 'pip. Anldra12 2 10,486 Jan-04-2022, 01:05 PM
Last Post: Anldra12
  Anaconda pip install mpyc Error pip-script.py is not present Anldra12 2 7,716 Dec-13-2021, 06:59 PM
Last Post: Anldra12
  Minecraft Python install error SomeAcandKid 1 2,307 Oct-06-2021, 06:22 PM
Last Post: Ronhamas
  Installed pip install openpyxl, Requirement already satisfied, but, still have error jonah88888 3 6,512 Sep-24-2021, 02:11 AM
Last Post: jonah88888

Forum Jump:

User Panel Messages

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