how to build with python 3 when 2 is the default one[Solved]

Discussions Regarding Software

Moderator: Moderators

how to build with python 3 when 2 is the default one[Solved]

Postby msdobrescu » Mon Feb 13, 2012 6:07

Hello,

I try to build dupeGuru ( http://www.hardcoded.net/dupeguru/ ).
It seems to request python 3.

Code: Select all
ImportError: No module named builtins/code]

I have python 2 and 3 installed, but 2 is the default one and I wouldn't make the 3 as default:

[code]python -V
Python 2.7.2


How could it be done?

Thank you.
Last edited by msdobrescu on Mon Feb 13, 2012 21:48, edited 1 time in total.
msdobrescu
Technological Hen
 
Posts: 444
Joined: Sun Aug 21, 2011 8:48

Re: how to build with python 3 when 2 is the default one

Postby sabayonino » Mon Feb 13, 2012 12:41

Hi

You can install python3 from entropy and switch it using eselect python command

build your package and then remember to switch to python2.7 becaus most applications are not supported from python3

check available python list
Code: Select all
# eeselect python list


Set python profile
Code: Select all
# eselect python set X


where "X" is the index of python showed

Example :
Code: Select all
# eselect python list
Available Python interpreters:
  [1]   python2.7 *
  [2]   python3.2


To switch from 2.7 to 3.2 type :
Code: Select all
@ eselect python set 2
User avatar
sabayonino
Sagely Hen
 
Posts: 2679
Joined: Sun Sep 21, 2008 1:12
Location: Italy

Re: how to build with python 3 when 2 is the default one

Postby msdobrescu » Mon Feb 13, 2012 18:06

Thank you,

Now, I have the following error:

Code: Select all
eselect python set 2
!!! Error: Cannot remove symlinks
exiting
msdobrescu
Technological Hen
 
Posts: 444
Joined: Sun Aug 21, 2011 8:48


Re: how to build with python 3 when 2 is the default one

Postby msdobrescu » Mon Feb 13, 2012 21:48

Thank you, it worked!
msdobrescu
Technological Hen
 
Posts: 444
Joined: Sun Aug 21, 2011 8:48


Return to Software in General

Who is online

Users browsing this forum: No registered users and 2 guests