In this guide we will walk you through setting up your VOC environment for development and testing. We will assume that you have Python 3.4 or 3.5, Java 7 or Java 8 JDK, and Apache ANT installed.
To check if you have Python installed, run
python --version at the command line
$ python --version Python 3.4.4
If you do not have Python 3.4 or newer install Python and check again.
To check if you have the JDK installed, run
$ javac -version javac 1.7.0_101
If you do not have at least Java 7 install Java and check again.
To check if Apache ANT is installed, run
$ ant -version Apache Ant(TM) version 1.9.7 compiled on April 24 2016
If Apache Ant is not installed, look for the binary file from Apache to download the latest version.
Get a copy of VOC¶
The first step is to create a project directory, and clone VOC:
$ mkdir tutorial $ cd tutorial $ git clone https://github.com/pybee/voc.git
Then create a virtual environment and install VOC into it:
$ python3 -m venv env $ . env/bin/activate $ cd voc $ pip install -e .
For Windows the use of cmd under Administrator permission is suggested instead of PowerShell.
> py -3 -m venv env > env\Scripts\activate.bat > cd voc > pip install -e .
Building the support JAR file¶
Next, you need to build the Python support file:
$ ant java
This should create a
dist/python-java-support.jar file. This JAR
file is a support library that implements Python-like behavior and
provides the Python standard library for the Java environment. This
JAR file must be included on the classpath for any VOC-generated