Gentoo Archives: gentoo-user

From: meino.cramer@×××.de
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] python 2.x vs 3.x
Date: Sun, 19 Feb 2012 16:39:04
Message-Id: 20120219163747.GA3021@solfire
In Reply to: Re: [gentoo-user] python 2.x vs 3.x by Mark Knecht
1 Mark Knecht <markknecht@×××××.com> [12-02-19 16:52]:
2 > On Sat, Feb 18, 2012 at 11:24 PM, <meino.cramer@×××.de> wrote:
3 > > Mark Knecht <markknecht@×××××.com> [12-02-19 03:13]:
4 > >> In a current thread started by Meino where he is having trouble
5 > >> emerging hydrogen he reported the following quoted data to Neil. I
6 > >> don't believe Neil has responded yet but Meino's data brought me back
7 > >> to a question I've meant to ask for a while so I'll take this
8 > >> opportunity.
9 > >>
10 > >> From Meino:
11 > >>
12 > >> <QUOTE>
13 > >> With
14 > >>
15 > >>    eselect python list
16 > >>
17 > >> I get
18 > >>
19 > >> Available Python interpreters:
20 > >>  [1]   python2.6
21 > >>  [2]   python2.7
22 > >>  [3]   python3.1
23 > >>  [4]   python3.2 *
24 > >> </QUOTE>
25 > >>
26 > >> which shows python3.2 as the system wide default.
27 > >>
28 > >>    It's been my understanding ever since we first emerged any
29 > >> python-3.x version that we were not supposed to set any version of
30 > >> python3 as the system wide default. On all of my systems I have
31 > >> something like this:
32 > >>
33 > >> c2stable ~ # eselect python list
34 > >> Available Python interpreters:
35 > >>   [1]   python2.7 *
36 > >>   [2]   python3.2
37 > >> c2stable ~ # eselect python list --python2
38 > >> Available Python 2 interpreters:
39 > >>   [1]   python2.7 *
40 > >> c2stable ~ # eselect python list --python3
41 > >> Available Python 3 interpreters:
42 > >>   [1]   python3.2 *
43 > >> c2stable ~ #
44 > >>
45 > >>    Now, like Paul Hartman I didn't have any trouble building and
46 > >> running Hydrogen as a Jack client. It works just fine for me. However
47 > >> no one else seemed to have picked up on Meino's configuration which
48 > >> makes me wonder if I missed the memo to make the 3.x version of the
49 > >> system wide default.
50 > >>
51 > >>    What is the current best practice in this area?
52 > >>
53 > >> Cheers,
54 > >> Mark
55 > >>
56 > >
57 > > Hi Mark,
58 > >
59 > > after a lot of revdep-rebuilds and unresolved (or over-resolved)
60 > > references hydrogen builds fine. TADA! ;)
61 > > That is very nice ! :))
62 > >
63 > > Thank you very much for all your help.
64 > >
65 > > Unfortunately the svn-build of blender builds, but
66 > > the executable only prints:
67 > >
68 > >    Fatal Python error: Py_Initialize: Unable to get the locale encoding
69 > >    LookupError: no codec search functions registered: can't find encoding
70 > >    [1]    20570 abort      blender -noaudio
71 > >
72 > > Does anyone has built a daily snapshot of the svn blender successfully
73 > > against the systemwide python 3.2. ?
74 > >
75 > > How can I get blender to work?
76 > >
77 > > Cheers
78 > > mcc
79 >
80 > Meino,
81 > First, congrats on getting Hydrogen going. May your life be full of
82 > head banging drum riff all day & night long.
83 >
84 > Now, can you verify that the system wide python setting was in fact
85 > what made it build on your system? I know you were doing lots and lots
86 > of things. Was switching this back to 2.7 the thing that allowed
87 > Hydrogen to build for you?
88 >
89 > As for Blender I really don't know what to do as I've never run it.
90 > Are you building Blender from an overlay or standard portage? If it's
91 > standard portage, and if the ebuild maintainer hasn't specifically
92 > said that you have to use 3.x then should a bug report be filed?
93 >
94 > That may make no sense on other information you posted. I really
95 > haven't paid any attention to that part. Sorry.
96 >
97 > Glad Hydrogen is working for you.
98 >
99 > Cheers,
100 > Mark
101 >
102
103 Hi Mark,
104
105 :)
106
107 currently the rest of my gentoo system is banging my head... ;))))
108
109 :)
110
111 I did it the hard way:
112 I threw away the installation of python-3.2 in /usr/local which I need
113 to compile blender. Effect: Blender does no longer build.
114
115 I removed all python installation from my system except of the one
116 emerge uses.
117
118 I did a revdep-rebuild -pv to see, what applications and libs depends
119 on what version of python.
120
121 I filtered out all package which looks like libs or things used by
122 other programs and tried to build them against python 3.2: Some failed
123
124 I reinstalled python all versions of python, which were needed from
125 the dependencies shown by revdep rebuild.
126
127 With eselect python I set it to python 2.7.
128
129 I rebuild hydrogen, which wasn't confused by linux3 setting from out
130 space (plan9, I think).
131
132 Blender now builds and runs. The trick was, that the system wide
133 python 3.2 (which blender needs) uses lib64 while the previously
134 under /usr/local installed one uses lib as the directory where its
135 own python code is store.
136
137 I build blender by myself. The pure vanilla code, freshly taken from
138 the developpers svn repository. No patch, no tweak. The real thing :)
139 ;)))
140
141 Unfortunately blender spit out messages, that it is built against
142 libpng-1.2.27 ... and the whole systems only contains libpng-1.5*.
143
144 Currently I have no clue, what the reasons fro this is. Unfortunately
145 the CUDE renderer fails to do its job. I can start blender...but not
146 really much more.
147
148 This was a day in deep hack mode. Strace was my friend...as so often.
149
150 Will see how I can fix the rest of the problems.
151
152 The main problem of builing hydrogen was the python under /usr/local
153 I think...
154
155 Will see what hick up next ....
156
157 Cheers,
158 Meino

Replies

Subject Author
Re: [gentoo-user] python 2.x vs 3.x Mark Knecht <markknecht@×××××.com>