Skip to main content

No project description provided

Project description

Python Bindings

How to install this

This project is currently work in progress, and is to be considered for all intents and porposes an alpha version.

To install the latest (alpha) release, run the following:

pip install ensmallen_graph

Compile the bindings

The project uses PyO3 and maturin. You need nightly rust in order to compile PyO3. This could be done by running:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh --default-toolchain nightly --profile default -y

Then we need to install maturin with:

cargo install maturin

And finally we can create the Wheels with:

maturin build --release

The wheels will be located in ./target/wheels/.

Compile the bindings for multiple Python versions

By default maturin will build for the installed python version.

To install other Python versions just run:

wget https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tar.xz
tar -xf Python-${PYTHON_VERSION}.tar.xz
(cd Python-${PYTHON_VERSION}; ./configure --enable-optimizations; make -j$(nproc); make -j$(nproc) install)

Where ${PYTHON_VERSION} is the choosen version, such as 3.8.3 or 3.6.10.

Solving the GLIBC__2.29__ not found error

This means that the linux package were built on a system with a really new Libc version. This can be solved by compiling your own bindings. In order to be compatible with as many systems as possible, we suggest to build them on Ubuntu 16.04 .

Exploiting Avx

The library vec_rand which is used in the crate can take advantage in using Avx instructions/

To compile the bindings with Avx Instructions you can run :

RUSTFLAGS=" -C target-cpu=native" maturin build --release --no-sdist

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

ensmallen_graph-0.2.3.tar.gz (10.5 kB view hashes)

Uploaded Source

Built Distributions

ensmallen_graph-0.2.3-cp38-none-win_amd64.whl (938.4 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

ensmallen_graph-0.2.3-cp38-cp38-macosx_10_7_x86_64.whl (849.7 kB view hashes)

Uploaded CPython 3.8 macOS 10.7+ x86-64

ensmallen_graph-0.2.3-cp37-none-win_amd64.whl (938.4 kB view hashes)

Uploaded CPython 3.7 Windows x86-64

ensmallen_graph-0.2.3-cp37-cp37m-macosx_10_7_x86_64.whl (849.7 kB view hashes)

Uploaded CPython 3.7m macOS 10.7+ x86-64

ensmallen_graph-0.2.3-cp36-none-win_amd64.whl (938.7 kB view hashes)

Uploaded CPython 3.6 Windows x86-64

ensmallen_graph-0.2.3-cp36-cp36m-macosx_10_7_x86_64.whl (849.8 kB view hashes)

Uploaded CPython 3.6m macOS 10.7+ x86-64

ensmallen_graph-0.2.3-cp35-none-win_amd64.whl (938.7 kB view hashes)

Uploaded CPython 3.5 Windows x86-64

ensmallen_graph-0.2.3-cp35-cp35m-macosx_10_7_x86_64.whl (849.8 kB view hashes)

Uploaded CPython 3.5m macOS 10.7+ x86-64

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