Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install Vowpal Wabbit python interface

VW recently added a python interface, however I am having trouble finding instructions for how to install it. If I install VW from homebrew (brew install vowpal-wabbit) and I open python, and call

import pyvw

I get an ImportError.

like image 913
Simon Avatar asked Aug 22 '15 14:08

Simon


2 Answers

I was able to successfully install the Python interface to VW using the following steps. Note that this is on an Ubuntu 14.04 machine with Anaconda Python 2.7.10.

  1. Prerequisites: Boost & miscellaneous Python development libraries:

    sudo apt-get install libboost-all-dev   
    sudo apt-get install python-dev libxml2-dev libxslt-dev   
    
  2. git clone the Vowpal Wabbit repo & enter the python directory.
  3. make Vowpal Wabbit & test your installation using python test.py.

import pyvw should work from within a Python console as well.

like image 53
tchakravarty Avatar answered Sep 25 '22 00:09

tchakravarty


pip install vowpalwabbit

should give you the latest version. then do

from vowpalwabbit import sklearn_vw

This will give you scikit's vowpalwabbit

like image 42
Anuj Gupta Avatar answered Sep 23 '22 00:09

Anuj Gupta