Simon Simon - 3 months ago 48
Python Question

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.

Answer

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.