Search code examples
pythonpipg++ubuntu-16.04vowpalwabbit

Can't install Vowpal Wabbit Python Wrapper Ubuntu 16.04


I'm having trouble with installation of the Vowpal Wabbit Python Wrapper:

$ pip3 install vowpalwabbit

Error:

lto1: fatal error: bytecode stream generated with LTO version 6.0 instead of the expected 4.1

error message

Note that:

  • libboost-program-options-dev, zlib1g-dev, libboost-python-dev are installed,
  • anaconda boost is installed.

System credentials: Ubuntu 16.04, Anaconda3 for Python 3.6, g++ 5.4.0.

Thank you!


Solution

  • Finally, I've got it! My solution is:

    1. Download installation packages of gcc-3.4.6 and g++-3.4.6 (people say, this version is "very close" to 4.1)

    2. Install downloaded packages:

      $ sudo dpkg -i compat-gcc34-3.4.6-ubuntu1204-1_amd64.deb $ sudo dpkg -i compat-gcc-34-c++_3.4.6-20_amd64.deb

    3. Change the default version of gcc compiler to 3.4.6:

      $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 50

    4. Install the VW Python Wrapper:

      $ pip3 install vowpalwabbit

    5. Change the default version of the compiler back:

      $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5

    So, it works for me.