Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Inkscape 0.48.3.1 problems with Python
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
sasq
Apprentice
Apprentice


Joined: 09 Sep 2005
Posts: 187
Location: Poland

PostPosted: Fri Nov 30, 2012 2:30 pm    Post subject: [SOLVED] Inkscape 0.48.3.1 problems with Python Reply with quote

I'm using Inkscape 0.48.3.1 r9886 on Gentoo.
I've noticed that extensions in Inkscape (which use Python) recently stopped working for me.
I cannot run any extension. Re-emerging of Inkscape didn't help.

I've described this problem on Inkscape's bug tracking system:
https://answers.launchpad.net/inkscape/+question/215655
and they confirmed that it's the problem with Python version.
Inkscape's extensions use Python 2 and they're not ported to Python 3 yet.
But I see that my system uses Python 3 by default:

Code:
python --version
Python 3.2.3


Is there any way to let Inkscape use Python 2 without messing with Python version for the rest of the system? Or maybe the ebuild needs some update to force using Python 2 instead of depending on defaults?
_________________
SasQ


Last edited by sasq on Fri Nov 30, 2012 4:38 pm; edited 1 time in total
Back to top
View user's profile Send private message
aCOSwt
Moderator
Moderator


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Fri Nov 30, 2012 2:34 pm    Post subject: Reply with quote

python being slotted, you can get both v2 and v3 on your system and select between both thanks to eselect python.

EDIT : BTW, If upstreams says that they get functions not ported to python3, then I really do not see the interest in fiddling the ebuild to accept python3...
Apart if you are looking for an easy way to break it.
_________________
Back to top
View user's profile Send private message
sasq
Apprentice
Apprentice


Joined: 09 Sep 2005
Posts: 187
Location: Poland

PostPosted: Fri Nov 30, 2012 2:51 pm    Post subject: Reply with quote

aCOSwt wrote:
python being slotted, you can get both v2 and v3 on your system and select between both thanks to eselect python.

Hmm... Does it mean that I have to switch Python version every time I need to use Inkscape and then switch back when I'm done? Couldn't it be automated somehow? And won't it affect the rest of the system when Inkscape is launched and uses Python switched to version 2?

I think better option would be to somehow tell Inkscape to use Python 2 always, without switching it system-wide. Maybe some change of environment variables in the script running Inkscape?

aCOSwt wrote:
EDIT : BTW, If upstreams says that they get functions not ported to python3, then I really do not see the interest in fiddling the ebuild to accept python3... Apart if you are looking for an easy way to break it.

I meant to fiddle it to use Python 2 always, instead of depending on the defaults (which seem to be Python 3 now in my system, but Inkscape requires Python 2).
_________________
SasQ
Back to top
View user's profile Send private message
aCOSwt
Moderator
Moderator


Joined: 19 Oct 2007
Posts: 2537
Location: Hilbert space

PostPosted: Fri Nov 30, 2012 4:21 pm    Post subject: Reply with quote

sasq wrote:
I meant to fiddle it to use Python 2 always, instead of depending on the defaults (which seem to be Python 3 now in my system, but Inkscape requires Python 2).

It's not that way things work. And you are the one responsible for setting defaults.

A/ Default at run time is what your eselect python list tells.
B/ Because not all the packages are working with python3, python2 should be the default.
C/ Because of B/, You can get a single python installed on your system : python2
D/ Because some packages are compatible with python3, you can make so they use python3 by setting USE_PYTHON="3.x" before building them in your make.conf all the packages honoring this variable will make the associated package depend on python3.

To sum up with :

You WANT a single python ? : that is python2
You WANT python3 for the packages that accept it and python2 for the others ? : Set the USE_PYTHON accordingly and set python2 as default with eselect.
_________________
Back to top
View user's profile Send private message
sasq
Apprentice
Apprentice


Joined: 09 Sep 2005
Posts: 187
Location: Poland

PostPosted: Fri Nov 30, 2012 4:38 pm    Post subject: Reply with quote

OK i switched to Python 2 through eselect and it seems to work fine.
Thanks for your explanations and all your help.

Edit:
In case someone has the same problem and wants to set Python 2 only for Inkscape instead of system-wide, here's how to do it:
http://answers.launchpad.net/inkscape/+question/215655#comment-2
_________________
SasQ
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia 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