Skip to content

Latest commit

 

History

History
79 lines (54 loc) · 1.96 KB

PIP.md

File metadata and controls

79 lines (54 loc) · 1.96 KB

Creating the adanet pip package using Linux

This requires Python, Bazel and Git. (And TensorFlow for testing the package.)

Activate virtualenv

Install virtualenv if it's not installed already:

~$ sudo apt-get install python-virtualenv

Create a virtual environment for the package creation:

~$ virtualenv --system-site-packages adanet_env

And activate it:

~$ source ~/adanet_env/bin/activate  # bash, sh, ksh, or zsh
~$ source ~/adanet_env/bin/activate.csh  # csh or tcsh

Clone the adanet repository.

(adanet_env)~$ git clone https://github.com/tensorflow/adanet && cd adanet

Build adanet pip packaging script

To build a pip package for adanet:

(adanet_env)~/adanet$ bazel build //adanet/pip_package:build_pip_package

Create the adanet pip package

(adanet_env)~/adanet$ bazel-bin/adanet/pip_package/build_pip_package /tmp/adanet_pkg

Install and test the pip package (optional)

Run the following command to install the pip package:

(adanet_env)~/adanet$ pip install /tmp/adanet_pkg/*.whl

Finally try importing adanet in Python outside the cloned directory:

(adanet_env)~/adanet$ cd ~
(adanet_env)~$ python -c "import adanet"

De-activate the virtualenv

(adanet_env)~/$ deactivate