2008年12月18日星期四

安装Python-visual 4.0beta

Vpython
为了使用 Python-visual 的新特性——表面材质(Surface Texture),更多的框架特性,灯光等等,在 hiweed2rc 上安装了最新的 4.0beta。
sudo apt-get install libboost-python-dev ftgl-dev libgtkglextmm-x11-dev libgle3-dev libgtkmm-dev libglademm-2.4-dev  scons
tar xjf visual-4.beta26.tar.bz2
  • 修改visual-4.beta26/src/core/util/errors.cpp,在开头加入“#include <stdlib.h>”,否则make时会出现下面的错误:
./core/util/errors.cpp: In function 'void cvisual::write_note(std::string, int,
std::string)':
./core/util/errors.cpp:40: error: 'getenv' was not declared in this scope
这是gcc-4.3的问题
  • 编译
cd ./visual-4.beta26
./configure; make
  • 安装
sudo make install
  • 测试
cd ./example
python texture_and_lighting.py
一切正常的话,就可以看到文章开头那样的动画。

没有评论:

发表评论


相关文章

Widget by Hoctro