简体   繁体   English

无法安装Vowpal Wabbit Python包装器Ubuntu 16.04

[英]Can't install Vowpal Wabbit Python Wrapper Ubuntu 16.04

I'm having trouble with installation of the Vowpal Wabbit Python Wrapper: 我在安装Vowpal Wabbit Python包装器时遇到问题:

$ 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, libboost-program-options-devzlib1g-devlibboost-python-dev
  • anaconda boost is installed. anaconda boost已安装。

System credentials : Ubuntu 16.04, Anaconda3 for Python 3.6, g++ 5.4.0. 系统凭证 :Ubuntu 16.04,适用于Python 3.6的Anaconda3,g ++ 5.4.0。

Thank you! 谢谢!

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 ) 下载gcc-3.4.6和g ++-3.4.6的安装包(人们说,这个版本“非常接近” 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 $ 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: 将gcc编译器的默认版本更改为3.4.6:

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

  4. Install the VW Python Wrapper: 安装大众Python包装器:

    $ pip3 install vowpalwabbit $ pip3安装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 $ 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. 因此,它对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM