Installing with Pip

Animius can be installed as a Pypi package. If you do not wish to install Animius manually and GPU support on Windows is not a concern (read more about GPU support here), installing via Docker can be a easier and cleaner approach.

System requirements

1. Installing Python

Firstly, check if your Python environment is already configured:

python3 --version
pip3 --version
virtualenv --version

If these packages are already installed, skip to the next step.
Otherwise, install Python 3.6.8 (Animius currently does not support Python 3.7 ), the pip package manager, and Virtualenv:

# Download Python 3.6.8 64-bit from https://www.python.org/downloads/release/python-368/

pip3 install -U pip virtualenv
# Build Python 3.6.8 from source code.
wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tar.xz
tar xvf Python-3.6.8.tgz
cd Python-3.6.8
./configure --enable-optimizations
make -j8
sudo make altinstall

# Install pip
sudo apt update
sudo apt install python3-pip
sudo pip3 install -U virtualenv  # system-wide install
# Download Python 3.6.8 64-bit from https://www.python.org/downloads/release/python-368/

sudo pip3 install -U virtualenv  # system-wide install

2. Create a virtual environment (recommended)

Python virtual environments are used to isolate package installation from the system.

# Create a new virtual environment by choosing a Python interpreter and making a ./venv directory to hold it:
virtualenv --system-site-packages -p python3 ./venv

# Activate the virtual environment:
.\venv\Scripts\activate

# Install packages within a virtual environment without affecting the host system setup. Start by upgrading pip:
pip install --upgrade pip
pip list  # show packages installed within the virtual environment

# And to exit virtualenv later:
deactivate  # don't exit until you're done using Animius
# Create a new virtual environment by choosing a Python interpreter and making a ./venv directory to hold it:
virtualenv --system-site-packages -p python3 ./venv

# Activate the virtual environment using a shell-specific command:
source ./venv/bin/activate  # sh, bash, ksh, or zsh

# When virtualenv is active, your shell prompt is prefixed with (venv).
# Install packages within a virtual environment without affecting the host system setup. Start by upgrading pip:
pip install --upgrade pip
pip list  # show packages installed within the virtual environment

# And to exit virtualenv later:
deactivate  # don't exit until you're done using Animius

3. Install TensorFlow

Tensorflow is a requirement of Animius that you have manually install (unless using Docker). This allows you to choose between the CPU and GPU versions of Tensorflow. Read more on CPU and GPU in the Animius GPU support guide.

Animius does not support Tensorflow 2.0

pip install --upgrade tensorflow==1.12.0.   # CPU-only
pip install --upgrade tensorflow-gpu==1.12.0.   # GPU

If your network provider locates in mainland China, we recommend you to use the mirror of Pypi held by Tsinghua University in order to speed up the downloading process.

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade tensorflow==1.12.0.   # CPU-only
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade tensorflow-gpu==1.12.0.   # GPU

4. Install Animius

Simply install tensorflow using PyPi:

pip install --upgrade animius

  Animius is now installed. Read the tutorials to get started.