Gentoo Archives: gentoo-user

From: Mark Knecht <markknecht@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] python 2.x vs 3.x
Date: Sun, 19 Feb 2012 19:49:02
Message-Id: CAK2H+efaBSaHtR760w==OfA6xBVgkHem+dJmp0f1nvqO=tfvHA@mail.gmail.com
In Reply to: Re: [gentoo-user] python 2.x vs 3.x by meino.cramer@gmx.de
1 On Sun, Feb 19, 2012 at 11:10 AM, <meino.cramer@×××.de> wrote:
2 > Mark Knecht <markknecht@×××××.com> [12-02-19 19:56]:
3 >> On Sun, Feb 19, 2012 at 8:37 AM,  <meino.cramer@×××.de> wrote:
4 >> > Mark Knecht <markknecht@×××××.com> [12-02-19 16:52]:
5 >> >> On Sat, Feb 18, 2012 at 11:24 PM,  <meino.cramer@×××.de> wrote:
6 >> >> > Mark Knecht <markknecht@×××××.com> [12-02-19 03:13]:
7 >> >> >> In a current thread started by Meino where he is having trouble
8 >> >> >> emerging hydrogen he reported the following quoted data to Neil. I
9 >> >> >> don't believe Neil has responded yet but Meino's data brought me back
10 >> >> >> to a question I've meant to ask for a while so I'll take this
11 >> >> >> opportunity.
12 >> >> >>
13 >> >> >> From Meino:
14 >> >> >>
15 >> >> >> <QUOTE>
16 >> >> >> With
17 >> >> >>
18 >> >> >>    eselect python list
19 >> >> >>
20 >> >> >> I get
21 >> >> >>
22 >> >> >> Available Python interpreters:
23 >> >> >>  [1]   python2.6
24 >> >> >>  [2]   python2.7
25 >> >> >>  [3]   python3.1
26 >> >> >>  [4]   python3.2 *
27 >> >> >> </QUOTE>
28 >> >> >>
29 >> >> >> which shows python3.2 as the system wide default.
30 >> >> >>
31 >> >> >>    It's been my understanding ever since we first emerged any
32 >> >> >> python-3.x version that we were not supposed to set any version of
33 >> >> >> python3 as the system wide default. On all of my systems I have
34 >> >> >> something like this:
35 >> >> >>
36 >> >> >> c2stable ~ # eselect python list
37 >> >> >> Available Python interpreters:
38 >> >> >>   [1]   python2.7 *
39 >> >> >>   [2]   python3.2
40 >> >> >> c2stable ~ # eselect python list --python2
41 >> >> >> Available Python 2 interpreters:
42 >> >> >>   [1]   python2.7 *
43 >> >> >> c2stable ~ # eselect python list --python3
44 >> >> >> Available Python 3 interpreters:
45 >> >> >>   [1]   python3.2 *
46 >> >> >> c2stable ~ #
47 >> >> >>
48 >> >> >>    Now, like Paul Hartman I didn't have any trouble building and
49 >> >> >> running Hydrogen as a Jack client. It works just fine for me. However
50 >> >> >> no one else seemed to have picked up on Meino's configuration which
51 >> >> >> makes me wonder if I missed the memo to make the 3.x version of the
52 >> >> >> system wide default.
53 >> >> >>
54 >> >> >>    What is the current best practice in this area?
55 >> >> >>
56 >> >> >> Cheers,
57 >> >> >> Mark
58 >> >> >>
59 >> >> >
60 >> >> > Hi Mark,
61 >> >> >
62 >> >> > after a lot of revdep-rebuilds and unresolved (or over-resolved)
63 >> >> > references hydrogen builds fine. TADA! ;)
64 >> >> > That is very nice ! :))
65 >> >> >
66 >> >> > Thank you very much for all your help.
67 >> >> >
68 >> >> > Unfortunately the svn-build of blender builds, but
69 >> >> > the executable only prints:
70 >> >> >
71 >> >> >    Fatal Python error: Py_Initialize: Unable to get the locale encoding
72 >> >> >    LookupError: no codec search functions registered: can't find encoding
73 >> >> >    [1]    20570 abort      blender -noaudio
74 >> >> >
75 >> >> > Does anyone has built a daily snapshot of the svn blender successfully
76 >> >> > against the systemwide python 3.2. ?
77 >> >> >
78 >> >> > How can I get blender to work?
79 >> >> >
80 >> >> > Cheers
81 >> >> > mcc
82 >> >>
83 >> >> Meino,
84 >> >>    First, congrats on getting Hydrogen going. May your life be full of
85 >> >> head banging drum riff all day & night long.
86 >> >>
87 >> >>    Now, can you verify that the system wide python setting was in fact
88 >> >> what made it build on your system? I know you were doing lots and lots
89 >> >> of things. Was switching this back to 2.7 the thing that allowed
90 >> >> Hydrogen to build for you?
91 >> >>
92 >> >>    As for Blender I really don't know what to do as I've never run it.
93 >> >> Are you building Blender from an overlay or standard portage? If it's
94 >> >> standard portage, and if the ebuild maintainer hasn't specifically
95 >> >> said that you have to use 3.x then should a bug report be filed?
96 >> >>
97 >> >>    That may make no sense on other information you posted. I really
98 >> >> haven't paid any attention to that part. Sorry.
99 >> >>
100 >> >>    Glad Hydrogen is working for you.
101 >> >>
102 >> >> Cheers,
103 >> >> Mark
104 >> >>
105 >> >
106 >> > Hi Mark,
107 >> >
108 >> > :)
109 >> >
110 >> > currently the rest of my gentoo system is banging my head... ;))))
111 >> >
112 >> > :)
113 >> >
114 >> > I did it the hard way:
115 >> > I threw away the installation of python-3.2 in /usr/local which I need
116 >> > to compile blender. Effect: Blender does no longer build.
117 >> >
118 >> > I removed all python installation from my system except of the one
119 >> > emerge uses.
120 >> >
121 >> > I did a revdep-rebuild -pv to see, what applications and libs depends
122 >> > on what version of python.
123 >> >
124 >> > I filtered out all package which looks like libs or things used by
125 >> > other programs and tried to build them against python 3.2: Some failed
126 >> >
127 >> > I reinstalled python all versions of python, which were needed from
128 >> > the dependencies shown by revdep rebuild.
129 >> >
130 >> > With eselect python I set it to python 2.7.
131 >> >
132 >> > I rebuild hydrogen, which wasn't confused by linux3 setting from out
133 >> > space (plan9, I think).
134 >> >
135 >> > Blender now builds and runs. The trick was, that the system wide
136 >> > python 3.2 (which blender needs) uses lib64 while the previously
137 >> > under /usr/local installed one uses lib as the directory where its
138 >> > own python code is store.
139 >> >
140 >> > I build blender by myself. The pure vanilla code, freshly taken from
141 >> > the developpers svn repository. No patch, no tweak. The real thing :)
142 >> > ;)))
143 >> >
144 >> > Unfortunately blender spit out messages, that it is built against
145 >> > libpng-1.2.27 ... and the whole systems only contains libpng-1.5*.
146 >> >
147 >> > Currently I have no clue, what the reasons fro this is. Unfortunately
148 >> > the CUDE renderer fails to do its job. I can start blender...but not
149 >> > really much more.
150 >> >
151 >> > This was a day in deep hack mode. Strace was my friend...as so often.
152 >> >
153 >> > Will see how I can fix the rest of the problems.
154 >> >
155 >> > The main problem of builing hydrogen was the python under /usr/local
156 >> > I think...
157 >> >
158 >> > Will see what hick up next ....
159 >> >
160 >> > Cheers,
161 >> > Meino
162 >>
163 >> Meino,
164 >>    Based on this thread's setup of python I had no trouble building
165 >> the stable version of blender offered in portage. I don't know how to
166 >> use blender but I had no trouble starting the app and getting the GUI
167 >> up.
168 >>
169 >>    If you are not able to duplicate this then I would like to know.
170 >> Are you using the stable version or something newer? If newer have you
171 >> tried the stable version? If you can build the stable version then you
172 >> have a basis to file bug reports on anything newer that doesn't work.
173 >> If you cannot build the stable version then we need to determine why
174 >> on my audio application laptop where I'm running Jack+ Rosegarden +
175 >> qjackctl + hydrogen + etc., and now blender, you would be having
176 >> trouble on a smilar machine.
177 >>
178 >> Cheers,
179 >> Mark
180 >>
181 >> slinky ~ # emerge -DuN blender
182 >> Calculating dependencies... done!
183 >> >>> Verifying ebuild manifests
184 >> >>> Starting parallel fetch
185 >> >>> Emerging (1 of 6) media-libs/ilmbase-1.0.2
186 >> >>> Emerging (2 of 6) media-libs/lcms-2.3
187 >> >>> Emerging (3 of 6) media-libs/ftgl-2.1.3_rc5
188 >> >>> Installing (1 of 6) media-libs/ilmbase-1.0.2
189 >> >>> Emerging (4 of 6) media-libs/openexr-1.7.0
190 >> >>> Installing (2 of 6) media-libs/lcms-2.3
191 >> >>> Installing (3 of 6) media-libs/ftgl-2.1.3_rc5
192 >> >>> Emerging (5 of 6) media-libs/openjpeg-1.4-r1
193 >> >>> Installing (5 of 6) media-libs/openjpeg-1.4-r1
194 >> >>> Installing (4 of 6) media-libs/openexr-1.7.0
195 >> >>> Emerging (6 of 6) media-gfx/blender-2.49b-r2
196 >> >>> Installing (6 of 6) media-gfx/blender-2.49b-r2
197 >> >>> Recording media-gfx/blender in "world" favorites file...
198 >> >>> Jobs: 6 of 6 complete                           Load avg: 8.96, 5.21, 2.35
199 >>
200 >>  * Messages for package media-gfx/blender-2.49b-r2:
201 >>
202 >>  * blender uses python integration.  As such, may have some
203 >>  * inherit risks with running unknown python scripting.
204 >>  *
205 >>  * CVE-2008-1103-1.patch has been removed as it interferes
206 >>  * with autosave undo features. Up stream blender coders
207 >>  * have not addressed the CVE issue as the status is still
208 >>  * a CANDIDATE and not CONFIRMED.
209 >>  *
210 >>  * It is recommended to change your blender temp directory
211 >>  * from /tmp to ~tmp or another tmp file under your home
212 >>  * directory. This can be done by starting blender, then
213 >>  * dragging the main menu down do display all paths.
214 >> >>> Auto-cleaning packages...
215 >>
216 >> >>> No outdated packages were found on your system.
217 >>
218 >>  * GNU info directory index is up-to-date.
219 >> slinky ~ #
220 >>
221 >
222 >
223 > Hi Mark,
224 >
225 > thank you very much for all your helping and installing
226 > applications!!!
227 >
228 > As I wrote:
229 >
230 >    I build blender by myself. The pure vanilla code, freshly taken from
231 >    the developpers svn repository. No patch, no tweak. The real thing :)
232 >
233 > I am using the developpers source code tree, which is 2.62. Blender
234 > 2.49 is a very old version of blender...
235 >
236 > I can start blender (build successful), but currently it does not find
237 > the GPU of my graphic card on which blender should render. This seems
238 > to be a bug in the nvidia driver...I have posted an according message
239 > to the german blender mailinglist "blendpolis".
240 >
241 > Since blender 2.62 is very much different from blender 2.49 (2.49
242 > cannot render on the GPU of a graphic card and has no physically
243 > correct render engine like blender 2.62) results from building/using
244 > blender 2.49 cannot be used to analyze bugs with blender 2.62.
245 > Furthermore they both use different versions of python.
246 >
247 > Will see what finally is the bug...
248 >
249 > Thank you for your help and testing, Mark!
250 >
251 > Cheers
252 > Meino
253
254 I understand new versions have new features. That's not really my
255 point. The real issue for this list (in my mind) is what can be done
256 on *Gentoo*, both with stable AND testing versions of software
257 supported by the Gentoo devs.
258
259 At this point, on my machine, I can build the stable version. Can you
260 build that version?
261
262 While writing this response I have now build the ~amd64 version of
263 blender which at this time is 2.60a. Again, I have no trouble starting
264 the GUI. I don't know whether the version works very well. (Or at
265 all!) I also don't know if this version has all the features you want
266 from 2.62, but I'm fairly sure 2.60a must be closer, correct?
267
268 My input to you, again, is please go about this the right way:
269
270 1) Build the stable version. Does it work.
271 2) Build the testing version. Does it work.
272 3) If both of those build but don't have the features you want or need
273 then file a new ebuild request to get it into standard portage and at
274 the same time look for an overlay that has one right now and try that.
275
276 At least, following some structured process like this, you have a
277 chance of knowing where he problems are and what _really_ needs to be
278 done in a minimal amount of time. I got this far in less than 60
279 minutes.
280
281 Good luck & cheers,
282 Mark
283
284
285 slinky ~ # emerge -DuN @world
286 Calculating dependencies... done!
287 >>> Verifying ebuild manifests
288 >>> Starting parallel fetch
289 >>> Emerging (1 of 3) media-libs/glew-1.6.0-r1
290 >>> Emerging (2 of 3) sci-physics/bullet-2.77
291 >>> Installing (1 of 3) media-libs/glew-1.6.0-r1
292 >>> Installing (2 of 3) sci-physics/bullet-2.77
293 >>> Emerging (3 of 3) media-gfx/blender-2.60a
294 >>> Installing (3 of 3) media-gfx/blender-2.60a
295 >>> Jobs: 3 of 3 complete Load avg: 8.68, 6.16, 2.74
296
297 * Messages for package media-gfx/blender-2.60a:
298
299 * Blender uses python integration. As such, may have some
300 * inherit risks with running unknown python scripting.
301 *
302 * It is recommended to change your blender temp directory
303 * from /tmp to /home/user/tmp or another tmp file under your
304 * home directory. This can be done by starting blender, then
305 * dragging the main menu down do display all paths.
306 *
307 * Blender has its own internal rendering engine but you
308 * can export to external renderers for image computation
309 * like: YafRay[1], sunflow[2], PovRay[3] and luxrender[4]
310 *
311 * If you need one of them just emerge it:
312 * [1] emerge -av media-gfx/yafray
313 * [2] emerge -av media-gfx/sunflow
314 * [3] emerge -av media-gfx/povray
315 * [4] emerge -av media-gfx/luxrender
316 *
317 * When setting the Blender paths with the User Preferences
318 * dialog box, remember to NOT declare your home's paths as:
319 * ~/.blender, but as: /home/user/.blender; in other words,
320 * DO NOT USE the tilde inside the paths, as Blender is not
321 * able to handle it, ignoring your customizations.
322 >>> Auto-cleaning packages...
323
324 >>> No outdated packages were found on your system.
325
326 * GNU info directory index is up-to-date.
327 * After world updates, it is important to remove obsolete packages with
328 * emerge --depclean. Refer to `man emerge` for more information.
329 slinky ~ #
330
331
332 Cheers,
333 Mark