<< 続きLightflow for ubuntu Linux32bit from USBメモリ(成功) 戻る 複数のバージョンのPythonインストール >>

Lightflow Install Fedora 16 Live USB 32bit

以下 Fedora 16の 32bit版Live USBを作り、Lightflowをインストールしました。 

以下の2ファイルをダウンロード

Downloads]$ ls
lf_redhat.tgz py152.tgz

移動します。
Downloads]$ mv lf_redhat.tgz /home/liveuser/

Downloads]$ mv py152.tgz /home/liveuser/

Downloads]$ cd ..

解凍します。
~]$ tar zxvf lf_redhat.tgz

~]$ tar zxvf py152.tgz

~]$ cd Lightflow/PM/Examples/

テストしてみます。エラーでます。
Examples]$ python ball1.py
Traceback (most recent call last):
File "ball1.py", line 3, in
from lightflowPM import *
ImportError: No module named lightflowPM

Examples]$ cd /home/liveuser/

以下の記述を追加保存します。
~]$ gedit .bash_profile


LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/Lightflow
PYTHONPATH=$PYTHONPATH:$HOME/Lightflow
LIGHTFLOWPATH=$HOME/Lightflow
LIGHTFLOW_SE_MEMORY=32000
LIGHTFLOW_VE_MEMORY=32000

export LD_LIBRARY_PATH PYTHONPATH LIGHTFLOWPATH LIGHTFLOW_SE_MEMORY LIGHTFLOW_VE_MEMORY

反映させます。
~]$ source .bash_profile

パスが通っているか確認します。
~]$ echo $LIGHTFLOWPATH
/home/liveuser/Lightflow

またテストします。
~]$ cd Lightflow/PM/Examples/
Examples]$ python ball1.py
Traceback (most recent call last):
File "ball1.py", line 3, in
from lightflowPM import *
ImportError: libstdc++-libc6.1-1.so.2: cannot open shared object file: No such file or directory

次のファイルをダウンロードします。
compat-libstdc++-6.2-2.9.0.14.i386.rpm
http://rpm.pbone.net/index.php3/stat/4/idpl/14760/com/compat-libstdc++-6.2-2.9.0.14.i386.rpm.html

[root@localhost liveuser]# cd Downloads/
[root@localhost Downloads]# ls
compat-libstdc++-6.2-2.9.0.14.i386.rpm

移動します。
[root@localhost Downloads]# mv compat-libstdc++-6.2-2.9.0.14.i386.rpm /home/liveuser
[root@localhost Downloads]# cd ..

インストールします。
[root@localhost liveuser]# rpm -ivh compat-libstdc++-6.2-2.9.0.14.i386.rpm
Preparing... ########################################### [100%]
1:compat-libstdc++ ########################################### [100%]

またまたテストします。
Examples]$ python ball1.py
ball1.py:3: RuntimeWarning: Python C API version mismatch for module lightflowPM: This Python has API version 1013, module lightflowPM has version 1007.
from lightflowPM import *

Lightflow Rendering Tools
Copyright (c) 1995-2000 by Jacopo Pantaleoni. All rights reserved

Segmentation fault (core dumped)


Python-1.5.2をビルドします。
Python-1.5.2]$ ./configure

コンパイラが入っていないので、以下のものをインストールします。
Various Compilers install

makeします。
Python-1.5.2]$ make

gcc -g -O2 -I./../Include -I.. -DHAVE_CONFIG_H -c -o fileobject.o fileobject.c
fileobject.c:590:1: error: conflicting types for ‘getline’
/usr/include/stdio.h:677:20: note: previous declaration of ‘getline’ was here
make[1]: *** [fileobject.o] Error 1
make[1]: Leaving directory `/home/liveuser/Python-1.5.2/Objects'
make: *** [Objects] Error 2


fileobject.cを開き、getlineをgetline1に4箇所置き換えます。
Python-1.5.2]$ cd Objects/
[liveuser@localhost Objects]$ gedit fileobject.c

再びmakeします。
Objects]$ cd ..
[liveuser@localhost Python-1.5.2]$ make


[root@localhost Python-1.5.2]# make altinstall
Python-1.5.2]$ python1.5
Python 1.5.2 (#1, Jan 12 2012, 20:40:44) [GCC 4.6.2 20111027 (Red Hat 4.6.2-1)] on linux3
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> ^Z
[1]+ Stopped python1.5
[liveuser@localhost Python-1.5.2]$

以下を実行するとレンダリングできました。
Examples]$ python1.5 ball1.py

Lightflow Rendering Tools
Copyright (c) 1995-2000 by Jacopo Pantaleoni. All rights reserved


Pinhole Camera On
Objects : 1

Rendering 300 x 300 pixels
00:00:00 - 87.1%

画像を確認します。
[liveuser@localhost Examples]$ eog ball1.tga

さらにレンダリング。Windowsより速いです。
[liveuser@localhost Examples]$ python1.5 mechanic.py

Lightflow Rendering Tools
Copyright (c) 1995-2000 by Jacopo Pantaleoni. All rights reserved


Pinhole Camera On
Objects : 3
00:00:00 - CSEADS 100/100 - boxes 26 - depth 1 - objects 18
00:00:00 - CSEADS 100/100 - boxes 26 - depth 1 - objects 6
LfSoftLight::Init()
00:00:01 - cell 418176 / 418176
LfSoftLight::Init()
00:00:01 - cell 418176 / 418176

Rendering 400 x 400 pixels
00:00:18 - 95.2%

LfDOFImager():
row 400 / 400

[liveuser@localhost Examples]$ eog mechanic.tga
mechanic.jpg
できました。うれしいですね。
  • -
  • -

<< 続きLightflow for ubuntu Linux32bit from USBメモリ(成功) 戻る 複数のバージョンのPythonインストール >>