6

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.

bfontaine
  • 18,169
  • 13
  • 73
  • 107
Simon
  • 2,840
  • 2
  • 18
  • 26

2 Answers2

6

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.

tchakravarty
  • 10,736
  • 12
  • 72
  • 116
3
pip install vowpalwabbit

should give you the latest version. then do

from vowpalwabbit import sklearn_vw

This will give you scikit's vowpalwabbit

Anuj Gupta
  • 6,328
  • 7
  • 36
  • 55