View previous topic :: View next topic |
Author |
Message |
while true Guru
Joined: 07 Apr 2010 Posts: 532 Location: Ljubljana, Slovenia
|
Posted: Mon Nov 10, 2014 7:47 pm Post subject: arm [SOLVED by changing python] |
|
|
i hope i am in right section, so i emerged net-misc/arm, but:
Code: | grom@kishta ~ $ arm
File "/usr/share/arm/prereq.py", line 65
print "TorCtl successfully installed"
^
SyntaxError: invalid syntax
grom@kishta ~ $ arm
File "/usr/share/arm/prereq.py", line 65
print "TorCtl successfully installed"
^
SyntaxError: invalid syntax
grom@kishta ~ $ arm --help
File "/usr/share/arm/prereq.py", line 65
print "TorCtl successfully installed"
^
SyntaxError: invalid syntax
grom@kishta ~ $ |
what is going on here? _________________ Kind regards, Goran Mitic
alive
while true
kick ass
Last edited by while true on Tue Nov 11, 2014 12:28 am; edited 1 time in total |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Mon Nov 10, 2014 10:02 pm Post subject: |
|
|
At first glance it looks like you're trying to run a python2 script in python3. Try running it as "python2 `which arm`" |
|
Back to top |
|
|
while true Guru
Joined: 07 Apr 2010 Posts: 532 Location: Ljubljana, Slovenia
|
Posted: Mon Nov 10, 2014 10:40 pm Post subject: |
|
|
hello Ant,
Code: | grom@kishta ~ $ python2 `which arm`
File "/usr/bin/arm", line 2
if [ "$0" = /usr/bin/arm ]; then
^
SyntaxError: invalid syntax
grom@kishta ~ $ |
Code: | grom@kishta ~ $ eselect python list
Available Python interpreters:
[1] python2.7
[2] python3.3 *
[3] python3.4
grom@kishta ~ $ |
aha, should i change python? _________________ Kind regards, Goran Mitic
alive
while true
kick ass |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21635
|
Posted: Mon Nov 10, 2014 11:29 pm Post subject: |
|
|
It looks like /usr/bin/arm is a shell script that runs the real arm for you. Yes, switching your system Python to Python2 should work. If it does, you should file a bug to have arm always use Python2 for that version, since it will require code patches before it can be run in Python3. |
|
Back to top |
|
|
while true Guru
Joined: 07 Apr 2010 Posts: 532 Location: Ljubljana, Slovenia
|
Posted: Tue Nov 11, 2014 12:27 am Post subject: |
|
|
Code: | kishta grom # eselect python list
Available Python interpreters:
[1] python2.7
[2] python3.3 *
[3] python3.4
kishta grom # eselect python set 1
kishta grom # eselect python list
Available Python interpreters:
[1] python2.7 *
[2] python3.3
[3] python3.4
kishta grom # arm
Connection refused. Is the ControlPort enabled?
kishta grom # |
I guess now it works, but i hit another problem, kheh, what is ControlPort, but i'll deal with that.
so, about this python change, this affects also other programs? _________________ Kind regards, Goran Mitic
alive
while true
kick ass |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Tue Nov 11, 2014 12:44 am Post subject: |
|
|
It shouldn't have any negative effect, because most up-to-date python programs should call python2 or python3 explicitly. Leaving the system python as v2 is the safest option since all legacy code would be written expecting /usr/bin/python to be v2. |
|
Back to top |
|
|
|