我想在 Ubuntu 13.04 中安装 PyV8。但是pip install -v pyv8
构建过程花费了很长时间,最终失败。
如何在 Ubuntu 13.04 机器上安装 PyV8?
这是错误日志
InstallationError: Command /home/x/pyv8/bin/python -c "import setuptools;__file__='/home/x/pyv8/build/pyv8/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-63AI25-record/install-record.txt --single-version-externally-managed --install-headers /home/x/pyv8/include/site/python2.7 failed with error code 1 in /home/x/pyv8/build/pyv8
答案1
网上有一个很好的教程,解决了这个问题: http://andrewwilkinson.wordpress.com/2012/01/23/integrating-python-and-javascript-with-pyv8/
不过,对我而言有效的步骤略有不同:
sudo apt-get install scons libboost-python-dev
svn checkout http://v8.googlecode.com/svn/trunk/ v8
svn checkout http://pyv8.googlecode.com/svn/trunk/ pyv8
cd v8
export V8_HOME=`pwd`
cd ../pyv8
sudo python setup.py build
sudo python setup.py install