title: How can I install pyv8 in Ubuntu 14.04?
body: <p>I installed the <code>libv8</code> and <code>libboost-all-dev</code> Ubuntu packages, then ran </p>
  
  <pre><code>sudo pip install pyv8
  </code></pre>
  
  <p>And got:</p>
  
  <pre><code>building '_PyV8' extension
  
  creating build/temp.linux-x86_64-2.7
  
  creating build/temp.linux-x86_64-2.7/src
  
  x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DBOOST_PYTHON_STATIC_LIB -Ilib/python/inc -Ilib/boost/inc -Ilib/v8/inc -I/usr/include/python2.7 -c src/Exception.cpp -o build/temp.linux-x86_64-2.7/src/Exception.o
  
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
  
  src/Exception.cpp: In static member function ‘static void ExceptionTranslator::Construct(PyObject*, boost::python::converter::rvalue_from_python_stage1_data*)’:
  
  src/Exception.cpp:207:25: warning: unused variable ‘cpp_err’ [-Wunused-variable]
  
     CJavascriptException* cpp_err =
  
                           ^
  
  x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DBOOST_PYTHON_STATIC_LIB -Ilib/python/inc -Ilib/boost/inc -Ilib/v8/inc -I/usr/include/python2.7 -c src/Context.cpp -o build/temp.linux-x86_64-2.7/src/Context.o
  
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
  
  In file included from src/Context.h:7:0,
  
                   from src/Context.cpp:1:
  
  src/Wrapper.h: In member function ‘const boost::python::api::object&amp; CJavascriptArray::ArrayIterator::dereference() const’:
  
  src/Wrapper.h:115:66: warning: returning reference to temporary [-Wreturn-local-addr]
  
       reference dereference() const { return m_array-&gt;GetItem(m_idx); }
  
                                                                    ^
  
  x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DBOOST_PYTHON_STATIC_LIB -Ilib/python/inc -Ilib/boost/inc -Ilib/v8/inc -I/usr/include/python2.7 -c src/Engine.cpp -o build/temp.linux-x86_64-2.7/src/Engine.o
  
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
  
  In file included from src/Context.h:7:0,
  
                   from src/Engine.h:7,
  
                   from src/Engine.cpp:1:
  
  src/Wrapper.h: In member function ‘const boost::python::api::object&amp; CJavascriptArray::ArrayIterator::dereference() const’:
  
  src/Wrapper.h:115:66: warning: returning reference to temporary [-Wreturn-local-addr]
  
       reference dereference() const { return m_array-&gt;GetItem(m_idx); }
  
                                                                    ^
  
  x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DBOOST_PYTHON_STATIC_LIB -Ilib/python/inc -Ilib/boost/inc -Ilib/v8/inc -I/usr/include/python2.7 -c src/Wrapper.cpp -o build/temp.linux-x86_64-2.7/src/Wrapper.o
  
  cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
  
  In file included from src/Wrapper.cpp:1:0:
  
  src/Wrapper.h: In member function ‘const boost::python::api::object&amp; CJavascriptArray::ArrayIterator::dereference() const’:
  
  src/Wrapper.h:115:66: warning: returning reference to temporary [-Wreturn-local-addr]
  
       reference dereference() const { return m_array-&gt;GetItem(m_idx); }
  
                                                                    ^
  
  src/Wrapper.cpp: In static member function ‘static v8::Handle&lt;v8::Boolean&gt; CPythonObject::IndexedDeleter(uint32_t, const v8::AccessorInfo&amp;)’:
  
  src/Wrapper.cpp:256:25: warning: variable ‘value’ set but not used [-Wunused-but-set-variable]
  
     v8::Handle&lt;v8::Value&gt; value = IndexedGetter(index, info);
  
                           ^
  
  src/Wrapper.cpp: In static member function ‘static void CPythonObject::SetupObjectTemplate(v8::Handle&lt;v8::ObjectTemplate&gt;)’:
  
  src/Wrapper.cpp:311:84: error: invalid conversion from ‘v8::Handle&lt;v8::Boolean&gt; (*)(v8::Local&lt;v8::String&gt;, const v8::AccessorInfo&amp;)’ to ‘v8::NamedPropertyQuery {aka v8::Handle&lt;v8::Integer&gt; (*)(v8::Local&lt;v8::String&gt;, const v8::AccessorInfo&amp;)}’ [-fpermissive]
  
     clazz-&gt;SetNamedPropertyHandler(NamedGetter, NamedSetter, NamedQuery, NamedDeleter);
  
                                                                                      ^
  
  In file included from src/Exception.h:6:0,
  
                   from src/Wrapper.h:8,
  
                   from src/Wrapper.cpp:1:
  
  /usr/include/v8.h:2414:8: error:   initializing argument 3 of ‘void v8::ObjectTemplate::SetNamedPropertyHandler(v8::NamedPropertyGetter, v8::NamedPropertySetter, v8::NamedPropertyQuery, v8::NamedPropertyDeleter, v8::NamedPropertyEnumerator, v8::Handle&lt;v8::Value&gt;)’ [-fpermissive]
  
     void SetNamedPropertyHandler(NamedPropertyGetter getter,
  
          ^
  
  src/Wrapper.cpp:312:94: error: invalid conversion from ‘v8::Handle&lt;v8::Boolean&gt; (*)(uint32_t, const v8::AccessorInfo&amp;) {aka v8::Handle&lt;v8::Boolean&gt; (*)(unsigned int, const v8::AccessorInfo&amp;)}’ to ‘v8::IndexedPropertyQuery {aka v8::Handle&lt;v8::Integer&gt; (*)(unsigned int, const v8::AccessorInfo&amp;)}’ [-fpermissive]
  
     clazz-&gt;SetIndexedPropertyHandler(IndexedGetter, IndexedSetter, IndexedQuery, IndexedDeleter);
  
                                                                                                ^
  
  In file included from src/Exception.h:6:0,
  
                   from src/Wrapper.h:8,
  
                   from src/Wrapper.cpp:1:
  
  /usr/include/v8.h:2437:8: error:   initializing argument 3 of ‘void v8::ObjectTemplate::SetIndexedPropertyHandler(v8::IndexedPropertyGetter, v8::IndexedPropertySetter, v8::IndexedPropertyQuery, v8::IndexedPropertyDeleter, v8::IndexedPropertyEnumerator, v8::Handle&lt;v8::Value&gt;)’ [-fpermissive]
  
     void SetIndexedPropertyHandler(IndexedPropertyGetter getter,
  
          ^
  
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  
  ----------------------------------------
  Cleaning up...
  Command /usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/pyv8/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-JQHgTo-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/pyv8
  Traceback (most recent call last):
    File "/usr/bin/pip", line 9, in &lt;module&gt;
      load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()
    File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 235, in main
      return command.main(cmd_args)
    File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 161, in main
      text = '\n'.join(complete_log)
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 42: ordinal not in range(128)
  </code></pre>
  
  <p>What's going wrong? How can I fix it?</p>