<< 6/7 >>
cgkit works under CentOS6.2 on virtualbox
Hello,
I installed cgkit under CentOS6.2 on virtualbox
2012-02-12 03:54:34
# uname -a
Linux 2.6.32-220.4.1.el6.i686
following are:
1.boost
Installed: boost-devel-1.41.0-11.el6_1.2.i686
2.gcc
# yum install gcc
Installed: kernel-headers-2.6.32-220.4.1.el6.i686
Updated: glibc-common-2.12-1.47.el6_2.5.i686
Updated: glibc-2.12-1.47.el6_2.5.i686
Installed: glibc-headers-2.12-1.47.el6_2.5.i686
Installed: glibc-devel-2.12-1.47.el6_2.5.i686
Installed: mpfr-2.4.1-6.el6.i686
Installed: cpp-4.4.6-3.el6.i686
Installed: ppl-0.10.2-11.el6.i686
Installed: cloog-ppl-0.15.7-1.2.el6.i686
Installed: gcc-4.4.6-3.el6.i686
3.freeglut
# yum install freeglut3
Installed: freeglut-2.6.0-1.el6.i686
4.cmake
Installed: cmake-2.6.4-5.el6.i686
5.# yum --enablerepo=epel install fltk
Installed: fltk-1.1.10-1.el6.i686
6.# yum --enablerepo=epel install aqsis
Installed: ilmbase-1.0.1-6.1.el6.i686
Installed: OpenEXR-libs-1.6.1-8.1.el6.i686
Installed: tinyxml-2.6.1-1.el6.i686
Installed: aqsis-libs-1.6.0-3.el6.i686
Installed: aqsis-core-1.6.0-3.el6.i686
Installed: aqsis-data-1.6.0-3.el6.noarch
Installed: aqsis-1.6.0-3.el6.i686
7.freeglut-devel
Installed: xorg-x11-proto-devel-7.6-13.el6.noarch
Installed: libXau-devel-1.0.5-1.el6.i686
Installed: libxcb-devel-1.5-1.el6.i686
Installed: libXdmcp-devel-1.0.3-1.el6.i686
Installed: libX11-devel-1.3-2.el6.i686
Installed: libXext-devel-1.1-3.el6.i686
Installed: libXfixes-devel-4.0.4-1.el6.i686
Installed: libXdamage-devel-1.1.2-1.el6.i686
Installed: libXxf86vm-devel-1.1.0-1.el6.i686
Installed: libdrm-devel-2.4.25-2.el6.i686
Installed: mesa-libGL-devel-7.11-3.el6.i686
Installed: mesa-libGLU-devel-7.11-3.el6.i686
Installed: freeglut-devel-2.6.0-1.el6.i686
8.
Installed: python-setuptools-0.6.10-3.el6.noarch
Installed: libgfortran-4.4.6-3.el6.i686
Installed: python-nose-0.10.4-3.1.el6.noarch
Installed: atlas-3.8.4-1.el6.i686
Installed: numpy-1.3.0-6.2.el6.i686
Installed: PyOpenGL-3.0.0-2.1.el6.noarch
9.
Installed: python-imaging-1.1.6-19.el6.i686
Download:Pyserials
http://pypi.python.org/pypi/pyserial
pyserial-2.6.tar.gz
# python setup.py install
10.
Installed: libstdc++-devel-4.4.6-3.el6.i686
Installed: compat-libstdc++-33-3.2.3-69.el6.i686
11.pygame
Installed: portmidi-217-3.el6.i686
Installed: SDL_image-1.2.10-1.el6.rf.i686
Installed: SDL_ttf-2.0.9-6.el6.i686
Installed: SDL_mixer-1.2.11-3.el6.i686
Installed: pygame-1.9.1-4.el6.i686
12.
Installed: gcc-c++-4.4.6-3.el6.i686
13.
Installed: ode-0.11.1-2.el6.i686
Installed: ode-devel-0.11.1-2.el6.i686
Installed: compat-libstdc++-296-2.96-144.el6.i686
Installed: Pyrex-0.9.8
14.
Installed: python-devel-2.6.6-29.el6.i686
Download PyODE
# python setup.py build
# python setup.py install
15.
Installed: scons-1.2.0-2.el6.rfx.noarch
16.
Installed: autoconf-2.63-5.1.el6.noarch
Installed: automake-1.11.1-1.2.el6.noarch
17.
Download PyProtocols
# python setup.py --without-speedups install
18.
Download cgkit-2.0.0alpha9.tar.gz
# cd cgkit-2.0.0alpha9/
# cd supportlib/
# scons
# cd ..
# python setup.py build
# python setup.py install
# cd utilities/
# python checkenv.py
----------------------------------------------------------------------
Python 2.6.6 (r266:84292, Dec 7 2011, 20:38:36)
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)]
Platform: linux2
----------------------------------------------------------------------
Python version: 2.6........... OK
PyProtocols................... is installed
PyOpenGL...................... is installed
PIL........................... is installed
pygame........................ is installed
PyODE......................... is installed
PySerial...................... is installed
cgkit (base).................. 2.0.0alpha9 (Feb 10 2012, 20:34)
cgkit (C++ lib)............... OK
cgkit (all)................... OK
render.py -r3delight simplescene.py
OK.
viewer.py -N softimage demo1.py
OK.
but
Navigation mode (Default: Maya) does not work.
As long as it works, I wouldn't worry about it.
CentOSのウィンドウ設定でAltキーをWindows keyに変更したらできました。
Thank you.
Yuichirou Yokomakura
Python3.3 and cgkit install for Windows7 32bit
cgkitをPython3.3環境、Windows7 32bit環境にインストールしてみました。少し難がありますが
何とか動きます。
cgkitはPython2.6や2.7環境では問題なく動きます。PyProtocolのインストールが面倒なだけでした。
Python3環境ではPyProtocolが必要なくなり、インストールが簡単になりましたが、微調整が必要なところです。
Python環境とRenderMan互換レンダラー(Pixie)をインストールしていきましょう。
■以下をWindows7 32bit環境にインストールします。
python-3.3.5.msi
cgkit-2.0.0.win32-py3.3.exe
pygame-1.9.2a0-hg_56e0eadfc267.win32-py3.3.msi
PyOpenGL-3.1.0.win32.exe
ode-0.13.1.win32-py3.3.exe
Pillow-2.5.0.win32-py3.3.exe
numpy-1.9.0b1-win32-superpack-python3.3.exe
だいたいのバイナリデータはこちらからダウンロードしました。
http://www.lfd.uci.edu/~gohlke/pythonlibs/
■インストールが終わったら、Python3.3の環境設定です。
コンピュータ右クリック→プロパティ→システムの詳細設定→環境変数→システム環境変数内のPATHをクリック→「編集」をクリック
変数値の行の最後に以下のパスを記入します。
;C:\Python33;C:\Python33\Scripts;
■再起動します。
■サンプルをcgkitのチュートリアルページからscriptをとってきます。
http://cgkit.sourceforge.net/tutorials/demo1.html
■OpenGL表示のviewerを起動してみましょう。
D:\Aplication\cgkit>viewer.py demo1.py
Traceback (most recent call last):
File "C:\Python33\Scripts\viewer.py", line 699, in
viewer.run()
File "C:\Python33\lib\site-packages\cgkit\tool.py", line 198, in run
self.action()
File "C:\Python33\Scripts\viewer.py", line 389, in action
self.handleEvents(events)
File "C:\Python33\Scripts\viewer.py", line 424, in handleEvents
key = e.str
AttributeError: 'Event' object has no attribute 'str'
■画面は表示されますが、altキーを押して画面操作をしようとするとウインドウが閉じてしまい、
エラーが表示されます。
■ここでエディタを使ってviewer.pyの424行を変更します。
key = e.str
↓
key = e.unicode
に変更してください。
■再度viewerを動かすとできます。
D:\Aplication\cgkit>viewer.py demo1.py
■続いてレンダリングをやってみましょう。事前に3delightをインストールしておきましょう。
32bit版3Delightはなくなっていました。ここではPixie Renderer(2009年開発停止)を利用します。
http://sourceforge.net/projects/pixie/files/
Pixie-2.2.6-Setup.exeをダウンロードしインストールします。
■シェーダコンパイラsdrcが
「このアプリケーションのサイド バイ サイド構成が正しくないため、アプリケーションを
開始できませんでした。詳細については、アプリケーションのイベント ログを参照する
か、コマンド ライン ツール sxstrace.exe を使用してください。」
と出るので、2010年にビルドしたPixie_2010-05-25_Win32.zipをダウンロードします。
https://github.com/scorpion007/pixie/downloads
解凍して、C:\Program Files\pixieフォルダの中身と入れ替えます。
uninstall.dat等はそのままにしておきます。
■cgkitでサンプルをPixieを使ってレンダリングしてみましょう。
D:\Aplication\cgkit>render.py -rpixie demo1.py
Exporting main.rib...
Traceback (most recent call last):
File "C:\Python33\Scripts\render.py", line 361, in
render.run()
File "C:\Python33\lib\site-packages\cgkit\tool.py", line 198, in run
self.action()
File "C:\Python33\Scripts\render.py", line 237, in action
bakestvar = bakestvar
File "C:\Python33\lib\site-packages\cgkit\cmds.py", line 981, in save
exp.exportFile(os.path.basename(filename), **options)
File "C:\Python33\lib\site-packages\cgkit\ribexport.py", line 172, in exportFi
le
explgt = self.adapt(obj, ILightSource)
File "C:\Python33\lib\site-packages\cgkit\ribexport.py", line 672, in adapt
return protocols.adapt(obj, interface)
File "C:\Python33\lib\site-packages\cgkit\protocols.py", line 53, in adapt
if interfaces.has_key(interface):
AttributeError: 'dict' object has no attribute 'has_key'
とエラーが出ます。
C:\Python33\Lib\site-packages\cgkit\protocols.pyをエディタで開きます。
53行目を変更します。
if interfaces.has_key(interface):
↓
if interface in interfaces:
protocols.pyを保存します。
■再度レンダリングします。
D:\Aplication\cgkit>render.py -rpixie demo1.py
Exporting main.rib...
1 passes...
Traceback (most recent call last):
File "C:\Python33\Scripts\render.py", line 361, in
render.run()
File "C:\Python33\lib\site-packages\cgkit\tool.py", line 198, in run
self.action()
File "C:\Python33\Scripts\render.py", line 237, in action
bakestvar = bakestvar
File "C:\Python33\lib\site-packages\cgkit\cmds.py", line 981, in save
exp.exportFile(os.path.basename(filename), **options)
File "C:\Python33\lib\site-packages\cgkit\ribexport.py", line 280, in exportFi
le
rpass.doPass(frameNr)
File "C:\Python33\lib\site-packages\cgkit\ribexport.py", line 832, in doPass
lid = self.exporter.applyLightSource(lgt)
File "C:\Python33\lib\site-packages\cgkit\ribexport.py", line 364, in applyLig
htSource
explgt.shaderSource())
File "C:\Python33\lib\site-packages\cgkit\ribexport.py", line 557, in writeSha
der
f = file(filename, "wt")
NameError: global name 'file' is not defined
とエラーが出ます。
C:\Python33\lib\site-packages\cgkit\ribexport.pyをエディタで開きます。
557行を変更します。
f = file(filename, "wt")
f = open(filename, "wt")
ribexport.pyを保存します。
■再度レンダリングすると無事に黄色の球体が表示されます。
D:\Aplication\cgkit>render.py -rpixie demo1.py
Exporting main.rib...
1 passes...
Compiling shaders...
Compiling glmaterial.sl
Compiling glpointlight.sl
Preprocessing time: 1s
Rendering "out.tif" (frame 0)...
Rendering time: 7s
■テクスチャがあるサンプルをレンダリングしてみましょう。調整が必要です。
以下からサンプルをダウンロードします。(simplescene.py, uvmap.png)
http://cgkit.sourceforge.net/tutorials/renderman.html
■レンダリングしてみます。
D:\Aplication\cgkit>render.py -r3delight simplescene.py
Exporting main.rib...
3 passes...
Converting "uvmap.png"
Traceback (most recent call last):
File "C:\Python33\Scripts\render.py", line 361, in
render.run()
File "C:\Python33\lib\site-packages\cgkit\tool.py", line 198, in run
self.action()
File "C:\Python33\Scripts\render.py", line 237, in action
bakestvar = bakestvar
File "C:\Python33\lib\site-packages\cgkit\cmds.py", line 981, in save
exp.exportFile(os.path.basename(filename), **options)
File "C:\Python33\lib\site-packages\cgkit\ribexport.py", line 271, in exportFi
le
rpass.doPass(frameNr)
File "C:\Python33\lib\site-packages\cgkit\ribexport.py", line 1267, in doPass
self.copyImageMap(map)
File "C:\Python33\lib\site-packages\cgkit\ribexport.py", line 1297, in copyIma
geMap
img = Image.open(texmap)
NameError: global name 'Image' is not defined
PILがないということなので
C:\Python33\lib\site-packages\cgkit\ribexport.pyをエディタで開きます。
68行目あたりに追加行。
from PIL import Image
を加えます。
■再度レンダリングします。できました。
D:\Aplication\cgkit>render.py -rpixie simplescene.py
Exporting main.rib...
3 passes...
Converting "uvmap.png"
Compiling shaders...
Compiling gldistantlight.sl
Compiling glmaterial.sl
Compiling glpointlight.sl
Compiling glspotlight.sl
Preprocessing time: 0s
Rendering "out.tif" (frame 0)...
Rendering time: 6s
Windows7 32bitとPython3.3環境でのcgkit関連のインストールは
まだ課題があります。テクスチャを貼ったviewer.pyがPILとうまくつながってくれません
D:\Aplication\cgkit>viewer.py simplescene.py
Texname: 1
Loading "uvmap.png"... Traceback (most recent call last):
File "C:\Python33\Scripts\viewer.py", line 699, in
viewer.run()
File "C:\Python33\lib\site-packages\cgkit\tool.py", line 198, in run
self.action()
File "C:\Python33\Scripts\viewer.py", line 384, in action
self.draw(self.cam, self.width, self.height)
File "C:\Python33\Scripts\viewer.py", line 676, in draw
renderer.paint(root)
File "C:\Python33\lib\site-packages\cgkit\glmaterial.py", line 104, in loadTe
Data
img = Image.open(fullname)
File "C:\Python33\lib\site-packages\cgkit\_Image.py", line 148, in open
raise ImportError("No module named Image. Please install PIL (http://www.py
honware.com/products/pil/index.htm).")
ImportError: No module named Image. Please install PIL (http://www.pythonware.c
m/products/pil/index.htm).
D:\Aplication\cgkit>viewer.py simplescene.py
Texname: 1
Loading "uvmap.png"... Traceback (most recent call last):
File "C:\Python33\Scripts\viewer.py", line 699, in
viewer.run()
File "C:\Python33\lib\site-packages\cgkit\tool.py", line 198, in run
self.action()
File "C:\Python33\Scripts\viewer.py", line 384, in action
self.draw(self.cam, self.width, self.height)
File "C:\Python33\Scripts\viewer.py", line 676, in draw
renderer.paint(root)
File "C:\Python33\lib\site-packages\cgkit\glmaterial.py", line 104, in loadTe
Data
img = Image.open(fullname)
AttributeError: 'module' object has no attribute 'open'
他objのインポートなど微調整が必要です。
引き続き、検証します。
ありがとうございます。
python cgkit install under Windows7
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
W:\python_cg_programing\pythoncgkitinstall>pip install Pillow-2.8.2-cp27-none-wi
n32.whl
Processing w:\python_cg_programing\pythoncgkitinstall\pillow-2.8.2-cp27-none-win
32.whl
Installing collected packages: Pillow
Successfully installed Pillow-2.8.2
W:\python_cg_programing\pythoncgkitinstall>pip freeze
Pillow==2.8.2
pyglet==1.2.2
pyprocessing==0.1.3.22
W:\python_cg_programing\pythoncgkitinstall>pip install pygame-1.9.2a0-cp27-none-
win32.whl
Processing w:\python_cg_programing\pythoncgkitinstall\pygame-1.9.2a0-cp27-none-w
in32.whl
Installing collected packages: pygame
Successfully installed pygame-1.9.2a0
W:\python_cg_programing\pythoncgkitinstall>pip install ode-0.13.1-cp27-none-win3
2.whl
Processing w:\python_cg_programing\pythoncgkitinstall\ode-0.13.1-cp27-none-win32
.whl
Installing collected packages: ode
Successfully installed ode-0.13.1
W:\python_cg_programing\pythoncgkitinstall>pip install cgkit-2.0.0-cp27-none-win
32.whl
Processing w:\python_cg_programing\pythoncgkitinstall\cgkit-2.0.0-cp27-none-win3
2.whl
Installing collected packages: cgkit
Successfully installed cgkit-2.0.0
W:\python_cg_programing\pythoncgkitinstall>pip install PyOpenGL-3.1.1a1-cp27-non
e-win32.whl
Processing w:\python_cg_programing\pythoncgkitinstall\pyopengl-3.1.1a1-cp27-none
-win32.whl
Installing collected packages: PyOpenGL
Successfully installed PyOpenGL-3.1.1a1
W:\python_cg_programing\pythoncgkitinstall>pip freeze
cgkit==2.0.0
ode==0.13.1
Pillow==2.8.2
pygame==1.9.2a0
pyglet==1.2.2
PyOpenGL==3.1.1a1
pyprocessing==0.1.3.22
W:\python_cg_programing\pythoncgkitinstall>
Python27とcgkit install (Windows7 32bit)
Python2.7.10をインストールするとpipもインストールされました。とても便利になりました。
pythonのモジュールはwhlが多くなってきました。
>pip install hoge****.whl
のような感じで簡単にインストールできます。
■Python2.7.10をインストールした後、
Windowsの環境変数Pathに以下を追記します。
気をつけて行います。既存のパスの最後に付けます
;C:\Python27;C:\Python27\Scripts
■ここで再起動します。
■次に、以下からダウンロードします。
http://www.lfd.uci.edu/~gohlke/pythonlibs/
Pillow-2.8.2-cp27-none-win32.whl
pygame-1.9.2a0-cp27-none-win32.whl
ode-0.13.1-cp27-none-win32.whl
PyOpenGL-3.1.1a1-cp27-none-win32.whl
cgkit-2.0.0-cp27-none-win32.whl
をダウンロードします。
またVpythonを使いたいならば
VPython-5.74-cp27-none-win32.whl
と
Microsoftから
VCForPython27.msiをダウンロードして
インストールします。
以下は、試したログです。
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
D:\Aplication>pip install Pillow-2.8.2-cp27-none-win32.whl
Processing d:\aplication\pillow-2.8.2-cp27-none-win32.whl
Installing collected packages: Pillow
Successfully installed Pillow-2.8.2
D:\Aplication>pip freeze
Pillow==2.8.2
pyglet==1.2.2
pyprocessing==0.1.3.22
D:\Aplication>pip install pygame-1.9.2a0-cp27-none-win32.whl
Processing d:\aplication\pygame-1.9.2a0-cp27-none-win32.whl
Installing collected packages: pygame
Successfully installed pygame-1.9.2a0
D:\Aplication>pip install ode-0.13.1-cp27-none-win32.whl
Processing d:\aplication\ode-0.13.1-cp27-none-win32.whl
Installing collected packages: ode
Successfully installed ode-0.13.1
D:\Aplication>pip install cgkit-2.0.0-cp27-none-win32.whl
Processing d:\aplication\cgkit-2.0.0-cp27-none-win32.whl
Installing collected packages: cgkit
Successfully installed cgkit-2.0.0
D:\Aplication>pip install PyOpenGL-3.1.1a1-cp27-none-win32.whl
Processing d:\aplication\pyopengl-3.1.1a1-cp27-none-win32.whl
Installing collected packages: PyOpenGL
Successfully installed PyOpenGL-3.1.1a1
■ここは時間かかります。しばらく待ちます。
■ここからVpythonのインストールです。
最初、エラーでインストールできませんでした。
D:\Aplication>pip install VPython-5.74-cp27-none-win32.whl
Processing d:\aplication\vpython-5.74-cp27-none-win32.whl
Collecting fonttools (from VPython==5.74)
Downloading FontTools-2.4.tar.gz (323kB)
100% |################################| 327kB 369kB/s
Collecting TTFQuery (from VPython==5.74)
Downloading TTFQuery-1.0.5.tar.gz
Collecting Polygon2 (from VPython==5.74)
Downloading Polygon2-2.0.7.zip (73kB)
100% |################################| 77kB 561kB/s
Collecting numpy (from fonttools->VPython==5.74)
Downloading numpy-1.9.2.tar.gz (4.0MB)
100% |################################| 4.0MB 79kB/s
Installing collected packages: numpy, fonttools, TTFQuery, Polygon2, VPython
Running setup.py install for numpy
Complete output from command C:\Python27\python.exe -c "import setuptools, t
okenize;__file__='c:\\windows\\temp\\pip-build-2wkd41\\numpy\\setup.py';exec(com
pile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __f
ile__, 'exec'))" install --record c:\windows\temp\pip-hob8vx-record\install-reco
rd.txt --single-version-externally-managed --compile:
non-existing path in 'numpy\\distutils': 'site.cfg'
non-existing path in 'numpy\\f2py': 'docs'
non-existing path in 'numpy\\f2py': 'f2py.1'
F2PY Version 2
blas_opt_info:
blas_mkl_info:
libraries mkl,vml,guide not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Py
thon27\\libs']
NOT AVAILABLE
openblas_info:
libraries openblas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python2
7\\libs']
NOT AVAILABLE
atlas_3_10_blas_threads_info:
Setting PTATLAS=ATLAS
libraries tatlas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\
\libs']
NOT AVAILABLE
atlas_3_10_blas_info:
libraries satlas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\
\libs']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['C:\\Python27\\lib', 'C:\\
', 'C:\\Python27\\libs']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['C:\\Python27\\lib', 'C:\\', '
C:\\Python27\\libs']
NOT AVAILABLE
blas_info:
libraries blas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\\l
ibs']
NOT AVAILABLE
blas_src_info:
NOT AVAILABLE
NOT AVAILABLE
non-existing path in 'numpy\\lib': 'benchmarks'
lapack_opt_info:
openblas_lapack_info:
libraries openblas not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python2
7\\libs']
NOT AVAILABLE
lapack_mkl_info:
mkl_info:
libraries mkl,vml,guide not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Py
thon27\\libs']
NOT AVAILABLE
NOT AVAILABLE
atlas_3_10_threads_info:
Setting PTATLAS=ATLAS
libraries tatlas,tatlas not found in C:\Python27\lib
libraries lapack_atlas not found in C:\Python27\lib
libraries tatlas,tatlas not found in C:\
libraries lapack_atlas not found in C:\
libraries tatlas,tatlas not found in C:\Python27\libs
libraries lapack_atlas not found in C:\Python27\libs
numpy.distutils.system_info.atlas_3_10_threads_info
NOT AVAILABLE
atlas_3_10_info:
libraries satlas,satlas not found in C:\Python27\lib
libraries lapack_atlas not found in C:\Python27\lib
libraries satlas,satlas not found in C:\
libraries lapack_atlas not found in C:\
libraries satlas,satlas not found in C:\Python27\libs
libraries lapack_atlas not found in C:\Python27\libs
numpy.distutils.system_info.atlas_3_10_info
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in C:\Python27\lib
libraries lapack_atlas not found in C:\Python27\lib
libraries ptf77blas,ptcblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries ptf77blas,ptcblas,atlas not found in C:\Python27\libs
libraries lapack_atlas not found in C:\Python27\libs
numpy.distutils.system_info.atlas_threads_info
NOT AVAILABLE
atlas_info:
libraries f77blas,cblas,atlas not found in C:\Python27\lib
libraries lapack_atlas not found in C:\Python27\lib
libraries f77blas,cblas,atlas not found in C:\
libraries lapack_atlas not found in C:\
libraries f77blas,cblas,atlas not found in C:\Python27\libs
libraries lapack_atlas not found in C:\Python27\libs
numpy.distutils.system_info.atlas_info
NOT AVAILABLE
lapack_info:
libraries lapack not found in ['C:\\Python27\\lib', 'C:\\', 'C:\\Python27\
\libs']
NOT AVAILABLE
lapack_src_info:
NOT AVAILABLE
NOT AVAILABLE
running install
running build
running config_cc
unifing config_cc, config, build_clib, build_ext, build commands --compiler
options
running config_fc
unifing config_fc, config, build_clib, build_ext, build commands --fcompiler
options
running build_src
build_src
building py_modules sources
creating build
creating build\src.win32-2.7
creating build\src.win32-2.7\numpy
creating build\src.win32-2.7\numpy\distutils
building library "npymath" sources
No module named msvccompiler in numpy.distutils; trying from distutils
Running from numpy source directory.
c:\windows\temp\pip-build-2wkd41\numpy\numpy\distutils\system_info.py:1603:
UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
c:\windows\temp\pip-build-2wkd41\numpy\numpy\distutils\system_info.py:1612:
UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
warnings.warn(BlasNotFoundError.__doc__)
c:\windows\temp\pip-build-2wkd41\numpy\numpy\distutils\system_info.py:1615:
UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
warnings.warn(BlasSrcNotFoundError.__doc__)
c:\windows\temp\pip-build-2wkd41\numpy\numpy\distutils\system_info.py:1505:
UserWarning:
Atlas (http://math-atlas.sourceforge.net/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [atlas]) or by setting
the ATLAS environment variable.
warnings.warn(AtlasNotFoundError.__doc__)
c:\windows\temp\pip-build-2wkd41\numpy\numpy\distutils\system_info.py:1516:
UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
warnings.warn(LapackNotFoundError.__doc__)
c:\windows\temp\pip-build-2wkd41\numpy\numpy\distutils\system_info.py:1519:
UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
warnings.warn(LapackSrcNotFoundError.__doc__)
C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution opt
ion: 'define_macros'
warnings.warn(msg)
error: Microsoft Visual C++ 9.0 is required (Unable to find vcvarsall.bat).
Get it from http://aka.ms/vcpython27
----------------------------------------
Command "C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c:\\wi
ndows\\temp\\pip-build-2wkd41\\numpy\\setup.py';exec(compile(getattr(tokenize, '
open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install
--record c:\windows\temp\pip-hob8vx-record\install-record.txt --single-version-
externally-managed --compile" failed with error code 1 in c:\windows\temp\pip-bu
ild-2wkd41\numpy
■エラーが出ました!!!
MicrosoftがPython 2.7用のコンパクトなVC++ 9.0コンパイラMicrosoft Visual C++ Compiler for Python 2.7を配布しています。
Microsoftから
VCForPython27.msiをダウンロードして
インストールします。
■ここを参考にしました。ありがとうございます。
http://www.regentechlog.com/2014/04/13/build-python-package-on-windows/
仕切りなおします。再度チャレンジ!
D:\Aplication>pip install VPython-5.74-cp27-none-win32.whl
Processing d:\aplication\vpython-5.74-cp27-none-win32.whl
Collecting fonttools (from VPython==5.74)
Using cached FontTools-2.4.tar.gz
Collecting TTFQuery (from VPython==5.74)
Using cached TTFQuery-1.0.5.tar.gz
Collecting Polygon2 (from VPython==5.74)
Using cached Polygon2-2.0.7.zip
Collecting numpy (from fonttools->VPython==5.74)
Using cached numpy-1.9.2.tar.gz
Installing collected packages: numpy, fonttools, TTFQuery, Polygon2, VPython
Running setup.py install for numpy
Running setup.py install for fonttools
Running setup.py install for TTFQuery
Running setup.py install for Polygon2
Successfully installed Polygon2-2.0.7 TTFQuery-1.0.5 VPython-5.74 fonttools nump
y-1.9.2
■内容を確認します
D:\Aplication>pip freeze
cgkit==2.0.0
FontTools==2.4
numpy==1.9.2
ode==0.13.1
Pillow==2.8.2
Polygon2==2.0.7
pygame==1.9.2a0
pyglet==1.2.2
PyOpenGL==3.1.1a1
pyprocessing==0.1.3.22
TTFQuery==1.0.5
VPython==5.74
●ありがとうございます。
64bit Windows10 install
とりいそぎ、メモ:
ありがとうございます。
Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.
C:\Users\Downloads>python
Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> ^Z
C:\Users\Downloads>pip install Pillow-3.4.2-cp27-cp27m-win_amd64.whl
Processing c:\users\sensei\downloads\pillow-3.4.2-cp27-cp27m-win_amd64.whl
Installing collected packages: Pillow
Successfully installed Pillow-3.4.2
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Users\Downloads>python -m pip install --upgrade pip
Collecting pip
Using cached pip-9.0.1-py2.py3-none-any.whl
Installing collected packages: pip
Found existing installation: pip 8.1.1
Uninstalling pip-8.1.1:
Successfully uninstalled pip-8.1.1
Successfully installed pip-9.0.1
C:\Users\Downloads>pip freeze
Pillow==3.4.2
C:\Users\Downloads>pip install pygame-1.9.2b1-cp27-cp27m-win_amd64.whl
Processing c:\users\sensei\downloads\pygame-1.9.2b1-cp27-cp27m-win_amd64.whl
Installing collected packages: pygame
Successfully installed pygame-1.9.2b1
C:\Users\sensei\Downloads>pip freeze
Pillow==3.4.2
pygame==1.9.2b1
C:\Users\Downloads>pip install PyOpenGL-3.1.1-cp27-cp27m-win_amd64.whl
Processing c:\users\sensei\downloads\pyopengl-3.1.1-cp27-cp27m-win_amd64.whl
Installing collected packages: PyOpenGL
Successfully installed PyOpenGL-3.1.1
C:\Users\Downloads>pip install ode-0.13.1-cp27-cp27m-win_amd64.whl
Processing c:\users\sensei\downloads\ode-0.13.1-cp27-cp27m-win_amd64.whl
Installing collected packages: ode
Successfully installed ode-0.13.1
C:\Users\Downloads>pip install cgkit-2.0.0-cp27-none-win_amd64.whl
Processing c:\users\sensei\downloads\cgkit-2.0.0-cp27-none-win_amd64.whl
Installing collected packages: cgkit
Successfully installed cgkit-2.0.0
C:\Users\Downloads>python -m pip install --upgrade pip
Microsoft Windows [Version 10.0.10240]
(c) 2015 Microsoft Corporation. All rights reserved.
>viewer.py demo1.py
>viewer.py demo3.py
>render.py -rprman demo1.py
Exporting main.rib...
1 passes...
Compiling shaders...
gldistantlight: compiled.
glmaterial: compiled.
glpointlight: compiled.
glspotlight: compiled.
spotlight3ds: compiled.
Preprocessing time: 0s
Rendering "out.tif" (frame 0)...
Rendering time: 0s
>sho out.tif
cgkit2.0.0 works under Fedora28
Fedora28でcgkit2.0.0+python2.7でビルドできました。boost-develをインストール。他checkenv.py で確認する。 py_slot.h,43行目snameに空白スペースを入れる"_" sname " py_geoms1.cpp,145行166行boost::python::make_tupleにしてbuildできました。ありがとうございます。
[@localhost ~]$ pip install cgkit==2.0.0
Collecting cgkit==2.0.0
Could not find a version that satisfies the requirement cgkit==2.0.0 (from versions: )
No matching distribution found for cgkit==2.0.0
Python Computer Graphics Kit v2.0.0
https://sourceforge.net/projects/cgkit/files/cgkit/cgkit-2.0.0/cgkit-2.0.0-py2k.tar.gz/download
[@localhost ~]$ sudo pip install pygame
Collecting pygame
Installing collected packages: pygame
Successfully installed pygame-1.9.4
[@localhost ~]$ sudo pip install ode
Collecting ode
Successfully installed ode-0.2.0
[mac@localhost ~]$ sudo pip install pyserial
Collecting pyserial
Installing collected packages: pyserial
Successfully installed pyserial-3.4
http://www.pythonware.com/products/pil/
[@localhost Imaging-1.1.7]$ sudo python setup.py install
Writing /usr/lib64/python2.7/site-packages/PIL/PIL-1.1.7-py2.7.egg-info
creating /usr/lib64/python2.7/site-packages/PIL.pth
[@localhost utilities]$ python checkenv.py
----------------------------------------------------------------------
Python 2.7.15 (default, Sep 21 2018, 23:26:48)
[GCC 8.1.1 20180712 (Red Hat 8.1.1-5)]
Platform: linux2
----------------------------------------------------------------------
Python version: 2.7........... OK
PyProtocols................... is installed
PyOpenGL...................... is installed
PIL........................... is installed
pygame........................ pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
is installed
PyODE......................... is installed
PySerial...................... is installed
cgkit (base).................. missing
cgkit (C++ lib)............... failed
The cgkit supportlib could not be imported. One possible reason for that
is that shared libraries (such as the boost_python runtime or OpenGL)
could not be found.
cgkit (all)................... failed
$ cd supportlib
$ # ...create & modify cpp_config.cpp if necessary...
$ scons
$ cd .. # if you were still in the supportlib directory
$ sudo python setup.py install
以下、error:
In file included from wrappers/py_arrayslots1.cpp:5:0:
wrappers/py_arrayslots1.cpp: In function ‘void class_ArraySlots()’:
wrappers/py_slot.h:43:75: error: unable to find string literal operator ‘operator""sname’ with ‘const char [11]’, ‘long unsigned int’ arguments
e ARRAYSLOT(sname,stype) class_<_ArraySlotIterator
>("_"sname"_Iterator", init&>()) \
^
wrappers/py_slot.h:43:75: note: in definition of macro ‘ARRAYSLOT’
e ARRAYSLOT(sname,stype) class_<_ArraySlotIterator >("_"sname"_Iterator", init&>()) \
^~~~~~~~~~~
wrappers/py_slot.h:43:75: error: unable to find string literal operator ‘operator""sname’ with ‘const char [11]’, ‘long unsigned int’ arguments
e ARRAYSLOT(sname,stype) class_<_ArraySlotIterator >("_"sname"_Iterator", init&>()) \
^
wrappers/py_slot.h:43:75: note: in definition of macro ‘ARRAYSLOT’
e ARRAYSLOT(sname,stype) class_<_ArraySlotIterator >("_"sname"_Iterator", init&>()) \
^~~~~~~~~~~
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
[solved]
py_slot.h,43行目snameの両側に空白スペースを入れる "_" sname "
[solved]
py_geoms1.cpp,line:145行 and line:166行 boost::python::make_tuple にしてbuildできました。
Thank you(^.^)
$viewer.py demo3.py
python cgkit has been installed on my Zorin-OS-12.4-Core-64
Virtualboxにubuntu系のZorinOSをインストールしました。
はじめにRenderMan互換rendererのpixieをインストールしました。詳しくは前の記事に書きました。
http://rman.sakura.ne.jp/sb/log/eid528.html
以下をインストールします。
$ sudo apt install python-dev
$ sudo apt install python-opengl
$ sudo apt install python-pygame
$ sudo apt install libboost-python-dev
$ sudo apt install python-pyode
$ sudo apt install libode-dev
$ sudo apt install python-serial
$ sudo apt install python-protocols
$ sudo apt install scons
ubuntuのpackageのpython-pilはインストールしません。
64bitの環境でcgkitでのテクスチャがうまく使えないので
PIL1.1.7をダウンロードしてきます。
http://www.pythonware.com/products/pil/
以下、pil1.1.7をubuntu系でインストールするための設定です。
$ sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib
$ sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib
$ sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
$ sudo apt install python-tk tk8.5-dev tcl8.5-dev tk8.5 tcl8.5
ここでtkinterが動くか確認します。大文字のTになっています。
$ python -m Tkinter
pil1.1.7を解凍します。
$ cd Downloads/
$ tar xvf Imaging-1.1.7.tar.gz
$ cd Imaging-1.1.7/
setup.pyの以下の部分にpathを書き加えます。
$ nano setup.py
TCL_ROOT = "/usr/include/tcl8.5/"
JPEG_ROOT = "/usr/lib/x86_64-linux-gnu/"
ZLIB_ROOT = "/usr/lib/x86_64-linux-gnu/"
TIFF_ROOT = None
FREETYPE_ROOT = "/usr/lib/x86_64-linux-gnu/"
LCMS_ROOT = None
pil1.1.7をビルドします。
python setup.py build_ext -i
pil1.1.7をインストールします。ログを記録します。
sudo python setup.py install --record files.txt
アンインストールするときは以下を使います。
cat files.txt | xargs rm -rf
running install_scripts
copying build/scripts-2.7/pilfile.py -> /usr/local/bin
copying build/scripts-2.7/pilprint.py -> /usr/local/bin
copying build/scripts-2.7/pilfont.py -> /usr/local/bin
copying build/scripts-2.7/pildriver.py -> /usr/local/bin
copying build/scripts-2.7/pilconvert.py -> /usr/local/bin
changing mode of /usr/local/bin/pilfile.py to 775
changing mode of /usr/local/bin/pilprint.py to 775
changing mode of /usr/local/bin/pilfont.py to 755
changing mode of /usr/local/bin/pildriver.py to 775
changing mode of /usr/local/bin/pilconvert.py to 775
running install_egg_info
Writing /usr/local/lib/python2.7/dist-packages/PIL/PIL-1.1.7.egg-info
creating /usr/local/lib/python2.7/dist-packages/PIL.pth
writing list of installed files to 'files.txt'
PIL1.1.7が動くか確認します。
~/Downloads/Imaging-1.1.7$ python
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Image
>>>
ctrl+dで抜けます。
こちらでも確認します。
$ python selftest.py
--------------------------------------------------------------------
PIL 1.1.7 TEST SUMMARY
--------------------------------------------------------------------
Python modules loaded from ./PIL
Binary modules loaded from ./PIL
--------------------------------------------------------------------
--- PIL CORE support ok
--- TKINTER support ok
--- JPEG support ok
--- ZLIB (PNG/ZIP) support ok
--- FREETYPE2 support ok
*** LITTLECMS support not installed
--------------------------------------------------------------------
Running selftest:
--- 57 tests passed.
cgkitは--- ZLIB (PNG/ZIP) support okでないとテクスチャが渡せません。
cgkitを入手します。
https://sourceforge.net/projects/cgkit/files/cgkit/
以下はcgkitのインストールです。
$ cd ../
~/Downloads$ tar xvf cgkit-2.0.0-py2k.tar.gz
環境を確認します。
$ cd cgkit-2.0.0/
$ cd utilities/
$ python checkenv.py
----------------------------------------------------------------------
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609]
Platform: linux2
----------------------------------------------------------------------
Python version: 2.7........... OK
PyProtocols................... is installed
PyOpenGL...................... is installed
PIL........................... is installed
pygame........................ is installed
PyODE......................... is installed
PySerial...................... is installed
cgkit (base).................. missing
cgkit (C++ lib)............... failed
The cgkit supportlib could not be imported. One possible reason for that
is that shared libraries (such as the boost_python runtime or OpenGL)
could not be found.
cgkit (all)................... failed
cgkitだけがインストールされてないので
以下を実行します。
$ cd ../
$ cd supportlib/
$ scons
しばらく待ちます。
scons: done building targets.
$ cd ../
$ sudo python setup.py install
しばらく待ちます。
running install_scripts
copying build/scripts-2.7/postbake.py -> /usr/local/bin
copying build/scripts-2.7/seqmv.py -> /usr/local/bin
copying build/scripts-2.7/seqrm.py -> /usr/local/bin
copying build/scripts-2.7/viewer.py -> /usr/local/bin
copying build/scripts-2.7/seqcp.py -> /usr/local/bin
copying build/scripts-2.7/convert3d.py -> /usr/local/bin
copying build/scripts-2.7/info3d.py -> /usr/local/bin
copying build/scripts-2.7/seqls.py -> /usr/local/bin
copying build/scripts-2.7/render.py -> /usr/local/bin
changing mode of /usr/local/bin/postbake.py to 755
changing mode of /usr/local/bin/seqmv.py to 755
changing mode of /usr/local/bin/seqrm.py to 755
changing mode of /usr/local/bin/viewer.py to 755
changing mode of /usr/local/bin/seqcp.py to 755
changing mode of /usr/local/bin/convert3d.py to 755
changing mode of /usr/local/bin/info3d.py to 755
changing mode of /usr/local/bin/seqls.py to 755
changing mode of /usr/local/bin/render.py to 755
running install_egg_info
Writing /usr/local/lib/python2.7/dist-packages/cgkit-2.0.0.egg-info
... finished setup
インストール完了です。
$ cd utilities/
mak@zorinos:~/Downloads/cgkit-2.0.0/utilities$ python checkenv.py
----------------------------------------------------------------------
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609]
Platform: linux2
----------------------------------------------------------------------
Python version: 2.7........... OK
PyProtocols................... is installed
PyOpenGL...................... is installed
PIL........................... is installed
pygame........................ is installed
PyODE......................... is installed
PySerial...................... is installed
cgkit (base).................. 2.0.0 (Nov 09 2018)
cgkit (C++ lib)............... OK
cgkit (all)................... OK
pythonで確認します。
$ python
Python 2.7.12 (default, Dec 4 2017, 14:50:18)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from cgkit.all import *
>>>
cgkitサイトのtutorialかdemoを入手します。
http://cgkit.sourceforge.net/tutorials/demo1.html
http://cgkit.sourceforge.net/tutorials/demo2.html
http://cgkit.sourceforge.net/tutorials/demo3.html
http://cgkit.sourceforge.net/tutorials/renderman.html
$viewer.py demo3.py
---------------------------------------------------------
cgkitのインストール時にエラーが出る場合
以下を参考にしてください。
以下、error:
In file included from wrappers/py_arrayslots1.cpp:5:0:
wrappers/py_arrayslots1.cpp: In function ‘void class_ArraySlots()’:
wrappers/py_slot.h:43:75: error: unable to find string literal operator ‘operator""sname’ with ‘const char [11]’, ‘long unsigned int’ arguments
e ARRAYSLOT(sname,stype) class_<_ArraySlotIterator >("_"sname"_Iterator", init&>()) \
^
wrappers/py_slot.h:43:75: note: in definition of macro ‘ARRAYSLOT’
e ARRAYSLOT(sname,stype) class_<_ArraySlotIterator >("_"sname"_Iterator", init&>()) \
^~~~~~~~~~~
wrappers/py_slot.h:43:75: error: unable to find string literal operator ‘operator""sname’ with ‘const char [11]’, ‘long unsigned int’ arguments
e ARRAYSLOT(sname,stype) class_<_ArraySlotIterator >("_"sname"_Iterator", init&>()) \
^
wrappers/py_slot.h:43:75: note: in definition of macro ‘ARRAYSLOT’
e ARRAYSLOT(sname,stype) class_<_ArraySlotIterator >("_"sname"_Iterator", init&>()) \
^~~~~~~~~~~
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
---------------------------------------
[solved]
py_slot.h,43行目snameの両側に空白スペースを入れる "_" sname "
[solved]
py_geoms1.cpp,line:145行 and line:166行 boost::python::make_tuple に変更します。
arch linux
xfce4-terminal
sudo pacman -S python2-pygame python2-opengl python2-pyserial ode tk
AURに登録されているパッケージをインストールするためのパッケージを導入します
ここではyay(Yet another Yogurt)をインストールします
$ sudo pacman -S git
$ git clone https://aur.archlinux.org/yay.git
$ cd yay
$ makepkg -si
$ yay -S python2-pyode
:: Checking for conflicts...
:: Checking for inner conflicts...
[Repo Make: 1] pyrex-0.9.9-5
[Aur: 1] python2-pyode-20100322-1
==> Remove make dependencies after install? [y/N] y
:: Downloaded PKGBUILD (1/1): python2-pyode
1 python2-pyode (Build Files Exist)
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> Diffs to show?
==> i
:: Parsing SRCINFO (1/1): python2-pyode
依存関係を解決しています...
衝突するパッケージがないか確認しています...
パッケージ (1) pyrex-0.9.9-5
合計ダウンロード容量: 0.24 MiB
合計インストール容量: 1.80 MiB
:: インストールを行いますか? [Y/n] y
:: パッケージを取得します...
pyrex-0.9.9-5-any 244.5 KiB 203K/s 00:01 [######################] 100%
(1/1) キーリングのキーを確認 [######################] 100%
(1/1) パッケージの整合性をチェック [######################] 100%
(1/1) パッケージファイルのロード [######################] 100%
(1/1) ファイルの衝突をチェック [######################] 100%
(1/1) 空き容量を確認 [######################] 100%
:: パッケージの変更を処理しています...
(1/1) インストール pyrex [######################] 100%
:: トランザクション後のフックを実行...
(1/1) Arming ConditionNeedsUpdate...
==> パッケージを作成: python2-pyode 20100322-1 (2018年11月10日 13時11分23秒)
==> ソースを取得...
-> ダウンロード PyODE-snapshot-2010-03-22.tar.bz2...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 397 100 397 0 0 710 0 --:--:-- --:--:-- --:--:-- 708
100 55651 100 55651 0 0 26500 0 0:00:02 0:00:02 --:--:-- 77078
==> source で md5sums ファイルを検証...
PyODE-snapshot-2010-03-22.tar.bz2 ... 成功
==> Cleaning up...
==> パッケージを作成: python2-pyode 20100322-1 (2018年11月10日 13時11分26秒)
==> ランタイムの依存関係を確認...
==> ビルドタイムの依存関係を確認...
==> ソースを取得...
-> PyODE-snapshot-2010-03-22.tar.bz2 を見つけました
==> source で md5sums ファイルを検証...
PyODE-snapshot-2010-03-22.tar.bz2 ... 成功
==> 既存の $srcdir/ ディレクトリを削除...
==> ソースを展開...
-> PyODE-snapshot-2010-03-22.tar.bz2 を bsdtar で展開
==> ソースの準備ができました。
==> パッケージを作成: python2-pyode 20100322-1 (2018年11月10日 13時11分28秒)
==> ランタイムの依存関係を確認...
==> ビルドタイムの依存関係を確認...
==> 警告: 既存の $srcdir/ ツリーを使用
==> build() を開始...
INFO:
found in /usr/include
INFO: Creating ode_trimesh.c
pyrexc -o ode_trimesh.c -I. -Isrc src/ode.pyx
/home/mak/.cache/yay/python2-pyode/src/PyODE-snapshot-2010-03-22/src/mass.pyx:263:18: Warning: 'not None' will become the default in a future version of Pyrex. Use 'or None' to allow passing None.
INFO: Creating ode_notrimesh.c
pyrexc -o ode_notrimesh.c -I. -Isrc src/ode.pyx
/home/mak/.cache/yay/python2-pyode/src/PyODE-snapshot-2010-03-22/src/mass.pyx:263:18: Warning: 'not None' will become the default in a future version of Pyrex. Use 'or None' to allow passing None.
INFO: Installing with trimesh support.
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/xode
copying xode/errors.py -> build/lib.linux-x86_64-2.7/xode
copying xode/transform.py -> build/lib.linux-x86_64-2.7/xode
copying xode/body.py -> build/lib.linux-x86_64-2.7/xode
copying xode/joint.py -> build/lib.linux-x86_64-2.7/xode
copying xode/node.py -> build/lib.linux-x86_64-2.7/xode
copying xode/parser.py -> build/lib.linux-x86_64-2.7/xode
copying xode/geom.py -> build/lib.linux-x86_64-2.7/xode
copying xode/__init__.py -> build/lib.linux-x86_64-2.7/xode
running build_ext
==> package() を開始...
INFO: found in /usr/include
INFO: ode_trimesh.c is up to date
INFO: ode_notrimesh.c is up to date
INFO: Installing with trimesh support.
running install
running build
running build_py
running build_ext
running install_lib
creating /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr
creating /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib
creating /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7
creating /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages
copying build/lib.linux-x86_64-2.7/ode.so -> /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages
creating /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages/xode
copying build/lib.linux-x86_64-2.7/xode/errors.py -> /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages/xode
copying build/lib.linux-x86_64-2.7/xode/transform.py -> /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages/xode
copying build/lib.linux-x86_64-2.7/xode/body.py -> /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages/xode
copying build/lib.linux-x86_64-2.7/xode/joint.py -> /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages/xode
copying build/lib.linux-x86_64-2.7/xode/node.py -> /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages/xode
copying build/lib.linux-x86_64-2.7/xode/parser.py -> /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages/xode
copying build/lib.linux-x86_64-2.7/xode/geom.py -> /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages/xode
copying build/lib.linux-x86_64-2.7/xode/__init__.py -> /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages/xode
byte-compiling /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages/xode/errors.py to errors.pyc
byte-compiling /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages/xode/transform.py to transform.pyc
byte-compiling /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages/xode/body.py to body.pyc
byte-compiling /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages/xode/joint.py to joint.pyc
byte-compiling /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages/xode/node.py to node.pyc
byte-compiling /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages/xode/parser.py to parser.pyc
byte-compiling /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages/xode/geom.py to geom.pyc
byte-compiling /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages/xode/__init__.py to __init__.pyc
running install_egg_info
Writing /home/mak/.cache/yay/python2-pyode/pkg/python2-pyode/usr/lib/python2.7/site-packages/PyODE-1.2.0-py2.7.egg-info
==> インストールを整理...
-> libtool ファイルを削除...
-> 不要なファイルを削除...
-> スタティックライブラリファイルを削除しています...
-> バイナリとライブラリから不要なシンボルを削除...
-> man と info ページを圧縮...
==> パッケージの問題をチェック...
==> パッケージを作成 "python2-pyode"...
-> .PKGINFO ファイルを生成...
-> .BUILDINFO ファイルを生成...
-> .MTREE ファイルを生成...
-> パッケージの圧縮...
==> fakeroot 環境を終了。
==> 作成完了: python2-pyode 20100322-1 (2018年11月10日 13時11分41秒)
==> Cleaning up...
パッケージをロード...
依存関係を解決しています...
衝突するパッケージがないか確認しています...
パッケージ (1) python2-pyode-20100322-1
合計インストール容量: 0.53 MiB
:: インストールを行いますか? [Y/n]
(1/1) キーリングのキーを確認 [######################] 100%
(1/1) パッケージの整合性をチェック [######################] 100%
(1/1) パッケージファイルのロード [######################] 100%
(1/1) ファイルの衝突をチェック [######################] 100%
(1/1) 空き容量を確認 [######################] 100%
:: パッケージの変更を処理しています...
(1/1) インストール python2-pyode [######################] 100%
:: トランザクション後のフックを実行...
(1/1) Arming ConditionNeedsUpdate...
依存関係を確認しています...
パッケージ (1) pyrex-0.9.9-5
合計削除容量: 1.80 MiB
:: 以上のパッケージを削除しますか? [Y/n]
:: パッケージの変更を処理しています...
(1/1) 削除 pyrex [######################] 100%
:: トランザクション後のフックを実行...
(1/1) Arming ConditionNeedsUpdate...
------------------------------------------------
特定のファイルが含まれているパッケージを検索
ファイルデータベースを同期してください:
# pacman -Fy
ファイルが含まれているパッケージを検索するには:
$ pacman -Fs libz.so
core/zlib 1:1.2.11-3
usr/lib/libz.so
~]$
[mak@localhost ~]$ pacman -Fs libjpeg.so
extra/jre8-openjdk-headless 8.u192-1
usr/lib/jvm/java-8-openjdk/jre/lib/amd64/libjpeg.so
extra/libjpeg-turbo 2.0.0-1
usr/lib/libjpeg.so
community/darktable 2:2.4.4-2
usr/lib/darktable/plugins/imageio/format/libjpeg.so
[mak@localhost ~]$ pacman -Fs libfreetype.so
extra/freetype2 2.9.1-1
usr/lib/libfreetype.so
[mak@localhost ~]$ pacman -S zlib libjpeg-turbo freetype2
エラー: root 権限がないとこの操作は実行できません。
[mak@localhost ~]$ sudo pacman -S zlib libjpeg-turbo freetype2
警告: zlib-1:1.2.11-3 は最新です -- 再インストール
警告: libjpeg-turbo-2.0.0-1 は最新です -- 再インストール
警告: freetype2-2.9.1-1 は最新です -- 再インストール
依存関係を解決しています...
衝突するパッケージがないか確認しています...
パッケージ (3) freetype2-2.9.1-1 libjpeg-turbo-2.0.0-1 zlib-1:1.2.11-3
合計インストール容量: 4.43 MiB
最終的なアップグレード容量: 0.00 MiB
:: インストールを行いますか? [Y/n] y
http://www.pythonware.com/products/pil/
cd Downloads/
tar xvf Imaging-1.1.7.tar.gz
/usr/binでターミナルを開きます
sudo mv python python.orig
[mak@localhost bin]$ sudo ln -s python2 python
python setup.py build_ext -i
/temp.linux-x86_64-2.7/_imagingmath.o
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now build/temp.linux-x86_64-2.7/_imagingmath.o -L/usr/local/lib -L/usr/lib -L/usr/lib -lpython2.7 -o /home/mak/Downloads/Imaging-1.1.7/PIL/_imagingmath.so
--------------------------------------------------------------------
PIL 1.1.7 SETUP SUMMARY
--------------------------------------------------------------------
version 1.1.7
platform linux2 2.7.15 (default, Jun 27 2018, 13:05:28)
[GCC 8.1.1 20180531]
--------------------------------------------------------------------
--- TKINTER support available
--- JPEG support available
--- ZLIB (PNG/ZIP) support available
--- FREETYPE2 support available
*** LITTLECMS support not available
*** Warning: zlib 1.2.11 may contain a security vulnerability.
*** Consider upgrading to zlib 1.2.3 or newer.
*** See: http://www.kb.cert.org/vuls/id/238678
http://www.kb.cert.org/vuls/id/680620
http://www.gzip.org/zlib/advisory-2002-03-11.txt
--------------------------------------------------------------------
To add a missing option, make sure you have the required
library, and set the corresponding ROOT variable in the
setup.py script.
To check the build, run the selftest.py script.
$ sudo python setup.py install
running install_scripts
copying build/scripts-2.7/pildriver.py -> /usr/bin
copying build/scripts-2.7/pilfont.py -> /usr/bin
copying build/scripts-2.7/pilfile.py -> /usr/bin
copying build/scripts-2.7/pilconvert.py -> /usr/bin
copying build/scripts-2.7/pilprint.py -> /usr/bin
changing mode of /usr/bin/pildriver.py to 755
changing mode of /usr/bin/pilfont.py to 755
changing mode of /usr/bin/pilfile.py to 755
changing mode of /usr/bin/pilconvert.py to 755
changing mode of /usr/bin/pilprint.py to 755
running install_egg_info
Writing /usr/lib/python2.7/site-packages/PIL/PIL-1.1.7-py2.7.egg-info
creating /usr/lib/python2.7/site-packages/PIL.pth
Imaging-1.1.7]$
Imaging-1.1.7]$ python
Python 2.7.15 (default, Jun 27 2018, 13:05:28)
[GCC 8.1.1 20180531] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import Image
>>> import Tkinter
>>>
[mak@localhost Imaging-1.1.7]$ python -m Tkinter
$ python checkenv.py
----------------------------------------------------------------------
Python 2.7.15 (default, Jun 27 2018, 13:05:28)
[GCC 8.1.1 20180531]
Platform: linux2
----------------------------------------------------------------------
Python version: 2.7........... OK
PyProtocols................... missing
PyProtocols is not installed. This package is required as soon as you are
using the cgkit scene management stuff (for example, as soon as you want
to use the viewer or render tool). You can get PyProtocols at this site:
http://peak.telecommunity.com/PyProtocols.html
PyOpenGL...................... is installed
PIL........................... is installed
pygame........................ pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
is installed
PyODE......................... is installed
PySerial...................... is installed
cgkit (base).................. missing
cgkit (C++ lib)............... failed
The cgkit supportlib could not be imported. One possible reason for that
is that shared libraries (such as the b oost_python runtime or OpenGL)
could not be found.
cgkit (all)................... failed
http://peak.telecommunity.com/PyProtocols.html
http://peak.telecommunity.com/dist/
$ unzip PyProtocols-0.9.3.zip
sudo python setup.py --without-speedups install
sudo pacman -S boost boost-libs scons
scons
n file included from wrappers/py_arrayslots1.cpp:5:
wrappers/py_arrayslots1.cpp: 関数 ‘void class_ArraySlots()’ 内:
wrappers/py_slot.h:43:75: エラー: unable to find string literal operator ‘operator""sname’ with ‘const char [11]’, ‘long unsigned int’ arguments
e ARRAYSLOT(sname,stype) class_<_ArraySlotIterator >("_"sname"_Iterator", init&>()) \
^~~~~~~~~~~
wrappers/py_slot.h:43:75: 備考: in definition of macro ‘ARRAYSLOT’
e ARRAYSLOT(sname,stype) class_<_ArraySlotIterator >("_"sname"_Iterator", init&>()) \
^~~~~~~~~~~
wrappers/py_slot.h:43:75: エラー: unable to find string literal operator ‘operator""sname’ with ‘const char [11]’, ‘long unsigned int’ arguments
e ARRAYSLOT(sname,stype) class_<_ArraySlotIterator >("_"sname"_Iterator", init&>()) \
^~~~~~~~~~~
wrappers/py_slot.h:43:75: 備考: in definition of macro ‘ARRAYSLOT’
e ARRAYSLOT(sname,stype) class_<_ArraySlotIterator >("_"sname"_Iterator", init&>()) \
^~~~~~~~~~~
error: command 'gcc' failed with exit status 1
wrappers/py_geoms1.cpp: メンバ関数 ‘boost::python::api::object _VariableIterator::next()’ 内:
wrappers/py_geoms1.cpp:145:24: エラー: could not convert ‘std::make_tuple(_Elements&& ...) [with _Elements = {std::__cxx11::basic_string, std::allocator >&, const support3d::VarStorage&, const support3d::VarType&, const int&}](info.support3d::PrimVarInfo::storage, info.support3d::PrimVarInfo::type, info.support3d::PrimVarInfo::multiplicity)’ from ‘std::tuple, std::allocator >, support3d::VarStorage, support3d::VarType, int>’ to ‘boost::python::api::object’
return make_tuple(name, info.storage, info.type, info.multiplicity);
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
wrappers/py_geoms1.cpp: 関数 ‘boost::python::api::object findVariable(support3d::GeomObject*, std::__cxx11::string)’ 内:
wrappers/py_geoms1.cpp:166:22: エラー: could not convert ‘std::make_tuple(_Elements&& ...) [with _Elements = {std::__cxx11::basic_string, std::allocator >&, support3d::VarStorage&, support3d::VarType&, int&}](info->support3d::PrimVarInfo::storage, info->support3d::PrimVarInfo::type, info->support3d::PrimVarInfo::multiplicity)’ from ‘std::tuple, std::allocator >, support3d::VarStorage, support3d::VarType, int>’ to ‘boost::python::api::object’
return make_tuple(name, info->storage, info->type, info->multiplicity);
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: command 'gcc' failed with exit status 1
$ sudo python setup.py install
Sum of Photometric type-related color channels and ExtraSamples doesn't match SamplesPerPixel. Defining non-color channels as ExtraSamples.
Manjaro Linux18 python cgkit install
Manjaro Linux 18 (Arch linux) in Thunderbolt3 SSD
ノートPC,LG gram 13Z980-NA77JにThunderbolt3 SSD archgon X70 240GBを外付けで使って認識しました。Windows10高速スタートアップを切り、shiftキーを押しながら「再起動」から「デバイスの選択」、「Nvme0」選択して、再起動するManjaro Linuxが起動しています。
$ sudo hdparm -t /dev/nvme0n1
/dev/nvme0n1:
HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device
Timing buffered disk reads: 2184 MB in 3.00 seconds = 727.63 MB/sec
■ハードウェア確認。
$ sudo pacman -S bolt
$ sudo pacman -S hardinfo
$ sudo pacman -S lshw
$ sudo pacman -S gsmartcontrol
$ sudo lshw -class disk -class storage
$ sudo fdisk -l
$ sudo hdparm -t /dev/nvme0n1
$ sudo smartctl -a /dev/nvme0n1
$ sudo pacman -Syu
■日本語入力
$ sudo pacman -S --needed qt5-translations
$ sudo pacman -S fcitx-mozc fcitx-gtk2 fcitx-gtk3 fcitx-qt5 kcm-fcitx
$ nano .xprofile
以下を記入保存。
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
■python cgkit installの準備。
$ sudo pacman -S python2-pygame python2-opengl python2-pyserial ode tk
$ sudo pacman -S boost boost-libs scons
AURに登録されているパッケージをインストールするためのパッケージを導入します。yay(Yet another Yogurt)をインストールします。
$ sudo pacman -S git
$ git clone https://aur.archlinux.org/yay.git
$ cd yay
$ makepkg -si
$ yay -S python2-pyode
■PIL1.1.7インストール
Manjaro Linuxはpython3が基本なので、ユーザのhomeにダミーディレクトリを作成します。
$ mkdir ~/bin
$ ln -s /usr/bin/python2 ~/bin/python
$ ln -s /usr/bin/python2-config ~/bin/python-config
$ export PATH=~/bin:$PATH
これでpython2.7が起動します。
毎回、python2を使うためには、
開いたターミナルで$ export PATH=~/bin:$PATHをします。
PIL1.1.7をダウンロード。
http://www.pythonware.com/products/pil/
$ cd Downloads/
$ tar xvf Imaging-1.1.7.tar.gz
$ python setup.py build_ext -i
$ sudo python setup.py install
■PyProtocolsインストール
http://peak.telecommunity.com/PyProtocols.html
http://peak.telecommunity.com/dist/
$ unzip PyProtocols-0.9.3.zip
$ sudo python setup.py --without-speedups install
■python cgkit2.0インストール
cgkitを入手します。
https://sourceforge.net/projects/cgkit/files/cgkit/
以下はcgkitのインストールです。
$ cd ../
~/Downloads$ tar xvf cgkit-2.0.0-py2k.tar.gz
環境を確認します。
$ cd cgkit-2.0.0/
$ cd utilities/
$ python checkenv.py
以下を実行します。
$ cd ../
$ cd supportlib/
$ scons
しばらく待ちます。
scons: done building targets.
$ cd ../
$ python setup.py build
■Build時のエラー対処
[solved]
py_slot.h,43行目snameの両側に空白スペースを入れる "_" sname "
[solved]
py_geoms1.cpp,line:145行 and line:166行 boost::python::make_tuple に変更します。
$ sudo python setup.py install
cgkitサイトのtutorialからdemoファイルを入手します。
http://cgkit.sourceforge.net/tutorials/demo1.html
http://cgkit.sourceforge.net/tutorials/demo2.html
http://cgkit.sourceforge.net/tutorials/demo3.html
http://cgkit.sourceforge.net/tutorials/renderman.html
$ viewer.py demo3.py
マウス alt+左ドラッグを使うために
Manjaro Linux xfceの場合
設定→ウインドウマネージャー(詳細)→アクセシビィリティ→
ウインドウを掴んだり移動するために使うキーを「None」にします。
Installed python cgkit and sitex air renderer under Windows10
最後のPython2.7の64bit版をwindows10にインストールしました。
python cgkitをインストールし、旧RenderMan互換レンダラーであるsitex air rendererを利用することにしました。
■手順
以下からいくつかのライブラリをダウンロードします。
http://www.lfd.uci.edu/~gohlke/pythonlibs/
■pipの設定
>python -m pip install --upgrade pip
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting pip
Downloading https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl (1.4MB)
|################################| 1.4MB 591kB/s
Installing collected packages: pip
Found existing installation: pip 19.2.3
Uninstalling pip-19.2.3:
Successfully uninstalled pip-19.2.3
Successfully installed pip-20.0.2
■pygameインストール
>pip install pygame-1.9.6-cp27-cp27m-win_amd64.whl
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Processing c:\users\yokamak\downloads\pygame-1.9.6-cp27-cp27m-win_amd64.whl
Installing collected packages: pygame
Successfully installed pygame-1.9.6
■odeインストール
>pip install ode-0.15.2-cp27-cp27m-win_amd64.whl
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Processing c:\users\yokamak\downloads\ode-0.15.2-cp27-cp27m-win_amd64.whl
Installing collected packages: ode
Successfully installed ode-0.15.2
■PyOpenGLインストール
>pip install PyOpenGL-3.1.5-cp27-cp27m-win_amd64.whl
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Processing c:\users\yokamak\downloads\pyopengl-3.1.5-cp27-cp27m-win_amd64.whl
Installing collected packages: PyOpenGL
Successfully installed PyOpenGL-3.1.5
■cgkitインストール
>pip install cgkit-2.0.0-cp27-none-win_amd64.whl
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Processing c:\users\yokamak\downloads\cgkit-2.0.0-cp27-none-win_amd64.whl
Installing collected packages: cgkit
Successfully installed cgkit-2.0.0
■インストールしたものの内容確認
C:\Users\yokamak\Downloads>pip freeze
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
cgkit==2.0.0
ode==0.15.2
pygame==1.9.6
PyOpenGL==3.1.5
■PILのダミーをインストール、自動的にPillowがインストール
>pip install "PIL-2.0+dummy-py2.py3-none-any.whl"
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Processing c:\users\yokamak\downloads\pil-2.0+dummy-py2.py3-none-any.whl
Collecting Pillow>=2.0
Downloading Pillow-6.2.2-cp27-cp27m-win_amd64.whl (1.9 MB)
|################################| 1.9 MB 3.0 MB/s
Installing collected packages: Pillow, PIL
Successfully installed PIL-2.0+dummy Pillow-6.2.2
■python cgkitの動作確認。
\cgkit>viewer.py demo1.py
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
\cgkit>viewer.py demo2.py
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
\cgkit>viewer.py demo3.py
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
■テクスチャを貼るシーンのロード失敗。Pillowは対応しない。
\cgkit>viewer.py simplescene.py
pygame 1.9.6
Hello from the pygame community. https://www.pygame.org/contribute.html
Texname: 1
Loading "uvmap.png"...
Traceback (most recent call last):
File "C:\Python27\Scripts\viewer.py", line 699, in
viewer.run()
File "C:\Python27\lib\site-packages\cgkit\tool.py", line 198, in run
self.action()
File "C:\Python27\Scripts\viewer.py", line 384, in action
self.draw(self.cam, self.width, self.height)
File "C:\Python27\Scripts\viewer.py", line 676, in draw
renderer.paint(root)
File "C:\Python27\lib\site-packages\cgkit\glmaterial.py", line 105, in loadTexData
self._passPILImage(img)
File "C:\Python27\lib\site-packages\cgkit\glmaterial.py", line 141, in _passPILImage
self.texData(w, h, format, GL_UNSIGNED_BYTE, img.tostring())
File "C:\Python27\lib\site-packages\PIL\Image.py", line 779, in tostring
"tostring() has been removed. Please call tobytes() instead."
NotImplementedError: tostring() has been removed. Please call tobytes() instead.
■レンダリングの確認、scitex air rendererを使用する。
\cgkit>render.py -rair demo1.py
Exporting main.rib...
1 passes...
Compiling shaders...
Preprocessing time: 0s
Rendering "out.tif" (frame 0)...
Rendering time: 2s
\cgkit>render.py -rair demo2.py
Exporting main.rib...
1 passes...
Compiling shaders...
Preprocessing time: 0s
Rendering "out.tif" (frame 0)...
Rendering time: 1s
■PILの削除
\cgkit>pip uninstall PIL
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Found existing installation: PIL 2.0+dummy
Uninstalling PIL-2.0+dummy:
Would remove:
c:\python27\lib\site-packages\pil-2.0+dummy.dist-info\*
Proceed (y/n)? y
Successfully uninstalled PIL-2.0+dummy
■内容確認
\cgkit>pip list
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Package Version
---------- -------
cgkit 2.0.0
ode 0.15.2
Pillow 6.2.2
pip 20.0.2
pygame 1.9.6
PyOpenGL 3.1.5
setuptools 41.2.0
■Pillowの削除
\cgkit>pip uninstall Pillow
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Found existing installation: Pillow 6.2.2
Uninstalling Pillow-6.2.2:
Would remove:
c:\python27\lib\site-packages\pil\*
c:\python27\lib\site-packages\pillow-6.2.2.dist-info\*
Proceed (y/n)? y
Successfully uninstalled Pillow-6.2.2
■内容確認
\cgkit>pip list
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Package Version
---------- -------
cgkit 2.0.0
ode 0.15.2
pip 20.0.2
pygame 1.9.6
PyOpenGL 3.1.5
setuptools 41.2.0
■PILのインストール
最後にpython cgkitは、pillowではなくてPILでないとテクスチャがはりつけられないので、Windows用のbinary installした。
thank you. ありがとうございます。
PIL-1.1.7.win-amd64-py2.7.exe
■Windows Compiled Libraries
以下からダウンロード
https://github.com/lightkeeper/lswindows-lib/blob/master/amd64/python/PIL-1.1.7.win-amd64-py2.7.exe?raw=true
sitex air rendererのダウンロード
http://www.sitexgraphics.com/html/download.html
python cgkitのサンプル
cgkitサイトのtutorialからdemoファイルを入手します。
http://cgkit.sourceforge.net/tutorials/demo1.html
http://cgkit.sourceforge.net/tutorials/demo2.html
http://cgkit.sourceforge.net/tutorials/demo3.html
コマンドプロンプトから
> viewer.py demo3.py
マウス alt+左ドラッグでカメラ目線。
sitex air rendererでレンダリングの確認
> render.py -rair demo3.py
以下は
http://cgkit.sourceforge.net/tutorials/renderman.html
> render.py -rair simplescene.py
ありがとうございます。
<< 6/7 >>