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 with pip install coffeeguy 1 162 Sep-08-2022, 01:27 AM
Last Post: snippsat
  kmeans install error (please help me) muratuzun 3 929 May-06-2022, 02:14 PM
Last Post: snippsat
  Install location setup new default Droidling 2 415 Apr-22-2022, 03:45 AM
Last Post: Droidling
  Setup Portable Python on Windows for script starts with double clicks? pstein 0 635 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 4,082 Jan-04-2022, 01:05 PM
Last Post: Anldra12
  Anaconda pip install mpyc Error pip-script.py is not present Anldra12 2 2,882 Dec-13-2021, 06:59 PM
Last Post: Anldra12
  Minecraft Python install error SomeAcandKid 1 1,172 Oct-06-2021, 06:27 PM
Last Post: Ronhamas
  Installed pip install openpyxl, Requirement already satisfied, but, still have error jonah88888 3 3,349 Sep-24-2021, 02:11 AM
Last Post: jonah88888
  How do I locate setup.py in my computer, or install the file? JaneTan 1 1,097 Aug-26-2021, 08:37 AM
Last Post: snippsat
  error trying to install sslstrip NullAdmin 1 2,576 Mar-11-2021, 09:37 PM
Last Post: buran

Forum Jump:

User Panel Messages

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