Skip to main content

Fast Artificial Neural Network Library (fann) bindings.

Project description


Python bindings for Fast Artificial Neural Networks 2.2.0 (FANN >= 2.2.0). These are the original python bindings included with FANN 2.1.0beta and updated to include support for python 2.6-3.4.


This is a python binding for Fast Artificial Neural Network Library (FANN >= 2.2.0) that implements multilayer artificial neural networks with support for both fully-connected and sparsely-connected networks. It includes a framework for easy handling of training data sets. It is easy to use, versatile, well- documented, and fast.

FANN 2.2.0 source


You can install fann2 from pkgsrc or from pypi, using either pip or easy_install:


$ pip install fann2


$ easy_install fann2


Source installation

Get and install pkgsrc. See pkgsrc documentation. for platform-specific information.

cd ${PKGSRCDIR}/devel/py-fann2

bmake install

From binaries

Get and install pkgsrc. See pkgsrc quickstart. for platform-specific information.

pkgin -y install py-fann2



>> from fann2 import libfann

and then create libfann.neural_net and libfann.training_data objects

>> ann = libfann.neural_net()

>> train_data = libfann.training_data()

Look at the examples at the FANN documentation and its C++ bindings for further reference.


As with the original python bindings, this package is distributed under the terms of the GNU Lesser General Public License, Version 2.1. See LICENSE for full terms and conditions.


Send us your patches and pull requests! We will release as often as these changes are received and integrated. There’s no reason to have countless branches of this package. Consider this the official one and that it’s being maintained!

The pkgsrc package is maintained by us as well. We are active users of FANN and fann2. If you don’t have or want a github account, send your patches for this package or the pkgsrc version to

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fann2-1.0.7.tar.gz (63.6 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page