Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
decibel-audio-player-1.04 needs python 2.7
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
tangram
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2007
Posts: 104
Location: 3City, Poland

PostPosted: Wed Sep 19, 2012 4:08 pm    Post subject: decibel-audio-player-1.04 needs python 2.7 Reply with quote

I just installed media-sound/decibel-audio-player-1.04,
when I try to run it, i got error message:
Quote:

Traceback (most recent call last):
File "/usr/share/decibel-audio-player/src/decibel-audio-player.py", line 22, in <module>
from tools import consts
File "/usr/share/decibel-audio-player/src/tools/__init__.py", line 19, in <module>
import consts, cPickle, gtk, gtk.glade, os
ImportError: No module named consts

Module const.py is in python 2.7.
My system python interpreter is set to 3.2.
How can I solve this problem,
Is there possibility to set python interpreter on application level ?
Thanks for any advices.
Back to top
View user's profile Send private message
tangram
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2007
Posts: 104
Location: 3City, Poland

PostPosted: Thu Sep 20, 2012 7:34 am    Post subject: Reply with quote

Ysterday evening I reviewed eselect python script and all was clean.
Python interpreter settings are valid only for whole system and there is no other way
to set separately different interpreters for system and some app.
What should I do ?
Because of one package ( decibel) downgrade system to python 2.7 (with possible side effects for portage)
or forget decibel ?
Back to top
View user's profile Send private message
yngwin
Developer
Developer


Joined: 19 Dec 2002
Posts: 4394
Location: Suzhou, China

PostPosted: Tue Oct 02, 2012 7:48 am    Post subject: Reply with quote

For starters, run python-updater.

I would suggest to upgrade your system python to the latest 2.7, and remove and mask python-3* (and run python-updater again, obviously), as it's not ready for prime time yet. This will give you the best python experience, unless you really need python-3 for something.
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
tangram
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2007
Posts: 104
Location: 3City, Poland

PostPosted: Wed Oct 03, 2012 12:42 pm    Post subject: Reply with quote

Hello Yngwin.
I lost hope that someone will answer me ...
I thought so, only I did not know if python change from 3* to 2.7 does not hurt portage ( and his python scripts ).
Back to top
View user's profile Send private message
tangram
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2007
Posts: 104
Location: 3City, Poland

PostPosted: Wed Oct 03, 2012 12:49 pm    Post subject: Reply with quote

Week ago I ran python-updater, due to exaile who could not find setuptools.
Back to top
View user's profile Send private message
yngwin
Developer
Developer


Joined: 19 Dec 2002
Posts: 4394
Location: Suzhou, China

PostPosted: Thu Oct 04, 2012 4:08 am    Post subject: Reply with quote

tangram wrote:
I thought so, only I did not know if python change from 3* to 2.7 does not hurt portage ( and his python scripts ).

As long as you make sure you have portage emerged with USE="python2 -python3" you will have no problem.

I also have
Code:
USE_PYTHON="2.7"
PYTHON_TARGETS="python2_7"

in make.conf, so that python packages will only be installed for that version. Use eselect python for setting the active version (but you already know this), and run python-updater. Then emerge -aC '>=python-3.0' and add that as a mask to your package.mask. Run python-updater once more for good measure, and your system should be consistent.
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
tangram
Tux's lil' helper
Tux's lil' helper


Joined: 21 Aug 2007
Posts: 104
Location: 3City, Poland

PostPosted: Thu Oct 04, 2012 6:50 pm    Post subject: Reply with quote

Good evening yngwin, thank you for extensive description, I will change python interpreter to 2.7, but by the way I will ask, why python 3* is the default install version, should not be: installation default 2.7, then advanced users may switch to 3* ?
Back to top
View user's profile Send private message
yngwin
Developer
Developer


Joined: 19 Dec 2002
Posts: 4394
Location: Suzhou, China

PostPosted: Sat Oct 06, 2012 6:25 am    Post subject: Reply with quote

Python-3 is in our stage3 install, because it is marked stable, and with the way portage calculates dependencies and favouring newer versions, we end up with python-3. This is unfortunate, but not that easy to undo in an automated way.
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
krinn
Advocate
Advocate


Joined: 02 May 2003
Posts: 4294

PostPosted: Sat Oct 06, 2012 9:07 am    Post subject: Reply with quote

I don't get something :

portage link /usr/bin/python with the wrapper, but also link /usr/bin/python2 and /usr/bin/python3 to your current 2 and 3 version.

so why not change the header of the program to use /usr/bin/python2 instead of the /usr/bin/python ?
Back to top
View user's profile Send private message
yngwin
Developer
Developer


Joined: 19 Dec 2002
Posts: 4394
Location: Suzhou, China

PostPosted: Sun Oct 07, 2012 6:14 am    Post subject: Reply with quote

That is indeed what should happen, and it is a bug in the ebuild. But it seems this package has gone unmaintained for the last two years. There are a couple of version bump requests open, but nothing has happened.
_________________
"Those who deny freedom to others deserve it not for themselves." - Abraham Lincoln
Free Culture | Defective by Design | EFF
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum