Python PyV8-安装期间出错

Python PyV8-安装期间出错,python,pyv8,Python,Pyv8,我想安装PyV8。我通过以下方式安装它: sudo pip3 install pyv8 我收到错误消息: Collecting pyv8 Downloading https://files.pythonhosted.org/packages/c6/fb/5c0512a373e3d0aad0b683f439e7bdd67f95a69e6473b76dc2cfdca2c43f/PyV8-0.5.zip Installing collected packages: pyv8 Running

我想安装PyV8。我通过以下方式安装它:

sudo pip3 install pyv8
我收到错误消息:

Collecting pyv8
  Downloading https://files.pythonhosted.org/packages/c6/fb/5c0512a373e3d0aad0b683f439e7bdd67f95a69e6473b76dc2cfdca2c43f/PyV8-0.5.zip
Installing collected packages: pyv8
  Running setup.py install for pyv8 ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-0yqr1qf0/pyv8/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-u2aby1pu/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.5
    copying PyV8.py -> build/lib.linux-x86_64-3.5
    running build_ext
    building '_PyV8' extension
    creating build/temp.linux-x86_64-3.5
    creating build/temp.linux-x86_64-3.5/src
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DBOOST_PYTHON_STATIC_LIB -Ilib/python/inc -Ilib/boost/inc -Ilib/v8/inc -I/usr/include/python3.5m -c src/Exception.cpp -o build/temp.linux-x86_64-3.5/src/Exception.o
    cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
    In file included from src/Exception.cpp:1:0:
    src/Exception.h:6:16: fatal error: v8.h: No such file or directory
     #include <v8.h>
                    ^
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-0yqr1qf0/pyv8/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-u2aby1pu/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-0yqr1qf0/pyv8/
收集pyv8
正在下载https://files.pythonhosted.org/packages/c6/fb/5c0512a373e3d0aad0b683f439e7bdd67f95a69e6473b76dc2cfdca2c43f/PyV8-0.5.zip
安装收集的软件包:pyv8
正在为pyv8运行setup.py安装。。。错误
从命令/usr/bin/python3-u-c“import setuptools,tokenize;uuu file,uuu=”/tmp/pip-install-0yqr1qf0/pyv8/setup.py';f=getattr(tokenize,'open',open)(uuuuu文件uuuuu);code=f.read().replace('\r\n','n');f.close();exec(compile,'code,'uuuu文件,'exec')”安装--record/tmp/pip-record-u2aby1pu/install-record.txt--外部管理的单一版本--编译:
正在运行的安装
运行构建
运行build\u py
创建构建
创建build/lib.linux-x86_64-3.5
复制PyV8.py->build/lib.linux-x86_64-3.5
运行build_ext
构建“\u PyV8”扩展
创建build/temp.linux-x86_64-3.5
创建build/temp.linux-x86_64-3.5/src
x86_64-linux-gnu-gcc-pthread-DNDEBUG-g-fwrapv-O2-Wall-Wstrict原型-g-fstack-protector-strong-Wformat-Werror=format-security-Wdate-time-D_-FORTIFY_-SOURCE=2-fPIC-DBOOST_-PYTHON\u静态_-LIB-Ilib/PYTHON/inc-Ilib/boost/inc-Ilib/inc-v8/inc-I/usr/inc/inc/inc-inc/inc/inc/inc-I/inc/inc/inc/inc/inc/inc/inc/inc/inc/inc/inc/inc/
Cc1Puls:警告:命令行选项'WraseTrimeType '对于C/Objc有效,但对于C++来说是无效的
在src/Exception.cpp中包含的文件中:1:0:
src/Exception.h:6:16:致命错误:v8.h:没有这样的文件或目录
#包括
^
编译终止。
错误:命令“x86_64-linux-gnu-gcc”失败,退出状态为1
----------------------------------------
命令“/usr/bin/python3-u-c”导入setuptools,标记化__文件_uu='/tmp/pip-install-0yqr1qf0/pyv8/setup.py';f=getattr(标记化“打开”,打开)(_文件);code=f.read().replace('\r\n','\n');f、 close();exec(编译(代码,文件,exec'))“安装--record/tmp/pip-record-u2aby1pu/install-record.txt--外部管理的单一版本--编译”失败,错误代码为/tmp/pip-install-0yqr1qf0/pyv8中的1/

我已经安装了
python3dev
最新版本。我应该如何解决这个问题?看起来缺少一些头文件,但是我怎么知道要安装什么呢

我通过应用以下命令集解决了这个问题。我的Python是2.7.15

sudo apt-get install libboost-all-dev
sudo apt-get install build-essential autoconf libtool pkg-config python-opengl python-imaging python-pyrex python-pyside.qtopengl idle-python2.7 qt4-dev-tools qt4-designer libqtgui4 libqtcore4 libqt4-xml libqt4-test libqt4-script libqt4-network libqt4-dbus python-qt4 python-qt4-gl libgle3 python-dev
sudo easy_install greenlet
sudo easy_install gevent
git clone https://github.com/buffer/pyv8.git
cd pyv8
sudo python setup.py build
sudo python setup.py install

当您看到
致命错误:[something]时,在此处找到了指令-

。h:没有这样的文件或目录
您缺少一个C头文件。通常,您可以通过
sudo-apt-get-install-lib[something]-dev
在Ubuntu上安装它们。但在这种情况下,情况并非如此。