* [gentoo-user] ceph and a possible python problem
@ 2013-08-15 22:55 William Kenworthy
2013-08-16 7:34 ` Keith Dart
0 siblings, 1 reply; 6+ messages in thread
From: William Kenworthy @ 2013-08-15 22:55 UTC (permalink / raw
To: gentoo-user
Iam trying to build the latest ceph (dumpling - 0.67, not in the tree)
from tarball - it compiles/installs but when I try and run it I am getting:
olympus ~ # ceph
File "/usr/bin/ceph", line 192
print '\n', s, '\n', '=' * len(s)
^
SyntaxError: invalid syntax
olympus ~ #
The ceph irc people thought it might be the python version, but Ive
tried both python2 and python3
I am now back on the older 61.7 which works fine - any ideas? Even if
someone else is successfully running 0.67 would be useful information
(i.e., its my problem :)
BillK
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] ceph and a possible python problem
2013-08-15 22:55 [gentoo-user] ceph and a possible python problem William Kenworthy
@ 2013-08-16 7:34 ` Keith Dart
2013-08-16 14:12 ` William Kenworthy
0 siblings, 1 reply; 6+ messages in thread
From: Keith Dart @ 2013-08-16 7:34 UTC (permalink / raw
To: gentoo-user; +Cc: billk
Re , William Kenworthy said:
> olympus ~ # ceph
> File "/usr/bin/ceph", line 192
> print '\n', s, '\n', '=' * len(s)
> ^
> SyntaxError: invalid syntax
> olympus ~ #
In Python 3 "print" is a function, and should be called like this:
print('\n', s, '\n', '=' * len(s))
This works as-is in Python 2, unless you have this at the top of the
file:
from __future__ import print_function
-- Keith
--
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Keith Dart <keith@dartworks.biz>
public key: ID: 19017044
<http://www.dartworks.biz/>
=====================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] ceph and a possible python problem
2013-08-16 7:34 ` Keith Dart
@ 2013-08-16 14:12 ` William Kenworthy
2013-08-16 14:15 ` Canek Peláez Valdés
0 siblings, 1 reply; 6+ messages in thread
From: William Kenworthy @ 2013-08-16 14:12 UTC (permalink / raw
To: gentoo-user
On 16/08/13 15:34, Keith Dart wrote:
> Re , William Kenworthy said:
>> olympus ~ # ceph
>> File "/usr/bin/ceph", line 192
>> print '\n', s, '\n', '=' * len(s)
>> ^
>> SyntaxError: invalid syntax
>> olympus ~ #
>
>
> In Python 3 "print" is a function, and should be called like this:
>
> print('\n', s, '\n', '=' * len(s))
>
> This works as-is in Python 2, unless you have this at the top of the
> file:
>
> from __future__ import print_function
>
>
> -- Keith
>
>
Thanks Keith, that was suggested on the ceph list but grepping doesnt
show it in the source. With this version of ceph they have replaced the
"ceph" binary with a python script so its quite different from the older
version which works. They target mainly centos and ubuntu/debian so I
will have to keep looking.
BillK
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] ceph and a possible python problem
2013-08-16 14:12 ` William Kenworthy
@ 2013-08-16 14:15 ` Canek Peláez Valdés
2013-08-16 14:31 ` William Kenworthy
0 siblings, 1 reply; 6+ messages in thread
From: Canek Peláez Valdés @ 2013-08-16 14:15 UTC (permalink / raw
To: gentoo-user
On Fri, Aug 16, 2013 at 9:12 AM, William Kenworthy <billk@iinet.net.au> wrote:
> On 16/08/13 15:34, Keith Dart wrote:
>> Re , William Kenworthy said:
>>> olympus ~ # ceph
>>> File "/usr/bin/ceph", line 192
>>> print '\n', s, '\n', '=' * len(s)
>>> ^
>>> SyntaxError: invalid syntax
>>> olympus ~ #
>>
>>
>> In Python 3 "print" is a function, and should be called like this:
>>
>> print('\n', s, '\n', '=' * len(s))
>>
>> This works as-is in Python 2, unless you have this at the top of the
>> file:
>>
>> from __future__ import print_function
>>
>>
>> -- Keith
>>
>>
> Thanks Keith, that was suggested on the ceph list but grepping doesnt
> show it in the source. With this version of ceph they have replaced the
> "ceph" binary with a python script so its quite different from the older
> version which works. They target mainly centos and ubuntu/debian so I
> will have to keep looking.
Have you tried a simple:
python3 /usr/bin/ceph
Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] ceph and a possible python problem
2013-08-16 14:15 ` Canek Peláez Valdés
@ 2013-08-16 14:31 ` William Kenworthy
2013-08-16 23:26 ` William Kenworthy
0 siblings, 1 reply; 6+ messages in thread
From: William Kenworthy @ 2013-08-16 14:31 UTC (permalink / raw
To: gentoo-user
On 16/08/13 22:15, Canek Peláez Valdés wrote:
> On Fri, Aug 16, 2013 at 9:12 AM, William Kenworthy <billk@iinet.net.au> wrote:
>> On 16/08/13 15:34, Keith Dart wrote:
>>> Re , William Kenworthy said:
>>>> olympus ~ # ceph
>>>> File "/usr/bin/ceph", line 192
>>>> print '\n', s, '\n', '=' * len(s)
>>>> ^
>>>> SyntaxError: invalid syntax
>>>> olympus ~ #
>>>
>>>
>>> In Python 3 "print" is a function, and should be called like this:
>>>
>>> print('\n', s, '\n', '=' * len(s))
>>>
>>> This works as-is in Python 2, unless you have this at the top of the
>>> file:
>>>
>>> from __future__ import print_function
>>>
>>>
>>> -- Keith
>>>
>>>
>> Thanks Keith, that was suggested on the ceph list but grepping doesnt
>> show it in the source. With this version of ceph they have replaced the
>> "ceph" binary with a python script so its quite different from the older
>> version which works. They target mainly centos and ubuntu/debian so I
>> will have to keep looking.
>
> Have you tried a simple:
>
> python3 /usr/bin/ceph
>
> Regards.
>
No, doesnt work either. The ceph guys say it works fine for them which
leaves me suspecting something is broken on my system ...
BillK
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [gentoo-user] ceph and a possible python problem
2013-08-16 14:31 ` William Kenworthy
@ 2013-08-16 23:26 ` William Kenworthy
0 siblings, 0 replies; 6+ messages in thread
From: William Kenworthy @ 2013-08-16 23:26 UTC (permalink / raw
To: gentoo-user
On 16/08/13 22:31, William Kenworthy wrote:
> On 16/08/13 22:15, Canek Peláez Valdés wrote:
>> On Fri, Aug 16, 2013 at 9:12 AM, William Kenworthy <billk@iinet.net.au> wrote:
>>> On 16/08/13 15:34, Keith Dart wrote:
>>>> Re , William Kenworthy said:
>>>>> olympus ~ # ceph
>>>>> File "/usr/bin/ceph", line 192
>>>>> print '\n', s, '\n', '=' * len(s)
>>>>> ^
>>>>> SyntaxError: invalid syntax
>>>>> olympus ~ #
>>>>
>>>>
>>>> In Python 3 "print" is a function, and should be called like this:
>>>>
>>>> print('\n', s, '\n', '=' * len(s))
>>>>
>>>> This works as-is in Python 2, unless you have this at the top of the
>>>> file:
>>>>
>>>> from __future__ import print_function
>>>>
>>>>
>>>> -- Keith
>>>>
>>>>
>>> Thanks Keith, that was suggested on the ceph list but grepping doesnt
>>> show it in the source. With this version of ceph they have replaced the
>>> "ceph" binary with a python script so its quite different from the older
>>> version which works. They target mainly centos and ubuntu/debian so I
>>> will have to keep looking.
>>
>> Have you tried a simple:
>>
>> python3 /usr/bin/ceph
>>
>> Regards.
>>
>
> No, doesnt work either. The ceph guys say it works fine for them which
> leaves me suspecting something is broken on my system ...
>
> BillK
>
>
Still not sure if I have a bug or a broken system.
1. If I use eselect to set python 3 and build ceph from the 9999 ebuild
it wont work
2. If I eselect python 2.7 it wont work
3. if I rebuild it with python 2.7 selected it now WORKS - yea!
4. if I eselect python 3.2 it wont work :(
Ok, I am suspecting that something in ceph isnt playing nicely with the
gentoo eselect system and having python2 and python3 on the system :(
I guess its pulling in something python2 when 3 is active which is where
the __future__ mechanism comes into play.
So next question is ... can I remove python2? - last I heard, portage
needs python2 and wont run properly with python3 - is that still the case?
BillK
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-08-16 23:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-15 22:55 [gentoo-user] ceph and a possible python problem William Kenworthy
2013-08-16 7:34 ` Keith Dart
2013-08-16 14:12 ` William Kenworthy
2013-08-16 14:15 ` Canek Peláez Valdés
2013-08-16 14:31 ` William Kenworthy
2013-08-16 23:26 ` William Kenworthy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox