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

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 the official Manylinux1 docker.

Compiling the bindings for Linux to push them to Pipy

In order to make the wheels usable by any linux system we must follow the manylinux2010 standard. We used to support manylinux1 but rust no longer support Glibc 2.5 so we had to bump it to the next standard.

To specify for which versions you wish to build the bindings just modify the folliowing line inside of ./ensmallen/setup/DockerFileManyLinux2010:

ENV PATH /opt/python/cp36-cp36m/bin/:/opt/python/cp37-cp37m/bin/:/opt/python/cp38-cp38/bin/:/opt/python/cp39-cp39/bin/:$PATH

This can be done by building the bindings inside a centos5 docker with:

git clone https://github.com/LucaCappelletti95/ensmallen
cd ensmallen
make build_manylinux2010 python_manylinux2010

The result wheels will be in ./ensmallen/bindings/python/target/wheels/.

A wheel will be created for each version of python, this is configurable in the Dockerfile ./ensmallen/setup/DockerFileManylinux2010 in a ENV var.

A tutorial on how the internals of Python's Cffi can be found here

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

ensmallen-0.7.0.dev9-cp310-none-win_amd64.whl (15.8 MB view details)

Uploaded CPython 3.10 Windows x86-64

ensmallen-0.7.0.dev9-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (16.8 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64

ensmallen-0.7.0.dev9-cp39-none-win_amd64.whl (15.8 MB view details)

Uploaded CPython 3.9 Windows x86-64

ensmallen-0.7.0.dev9-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (16.8 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

ensmallen-0.7.0.dev9-cp38-none-win_amd64.whl (15.8 MB view details)

Uploaded CPython 3.8 Windows x86-64

ensmallen-0.7.0.dev9-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (16.8 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

ensmallen-0.7.0.dev9-cp37-none-win_amd64.whl (15.7 MB view details)

Uploaded CPython 3.7 Windows x86-64

ensmallen-0.7.0.dev9-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (16.8 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

ensmallen-0.7.0.dev9-cp36-none-win_amd64.whl (15.7 MB view details)

Uploaded CPython 3.6 Windows x86-64

ensmallen-0.7.0.dev9-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (16.8 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

File details

Details for the file ensmallen-0.7.0.dev9-cp310-none-win_amd64.whl.

File metadata

  • Download URL: ensmallen-0.7.0.dev9-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 15.8 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.6

File hashes

Hashes for ensmallen-0.7.0.dev9-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 b0f7fc80dc32388b2b90d3393db15aa4843ef8ef5d760b8a31ef853e0ba891e5
MD5 ff48259532e55498e1b68294b4786fe3
BLAKE2b-256 5f20b12b37944dde774ff98f38a928e8ff48cf6970aea691c63a20ac2387e156

See more details on using hashes here.

File details

Details for the file ensmallen-0.7.0.dev9-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for ensmallen-0.7.0.dev9-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 d8fa563184b1ffc226f9332254057ec22648ae195b0d7eeeea63631df21acfc4
MD5 c6434c8cf153c11c1e48308a1ed8bb60
BLAKE2b-256 3ee0aeaa4085af475e42ed911a0b022d24e6a22896d4b814758994092d4ab5cc

See more details on using hashes here.

File details

Details for the file ensmallen-0.7.0.dev9-cp39-none-win_amd64.whl.

File metadata

  • Download URL: ensmallen-0.7.0.dev9-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 15.8 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.6

File hashes

Hashes for ensmallen-0.7.0.dev9-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 83215c706704c914598bc2bd0d531275472ff39063ee44c6dbcbee73886428c4
MD5 4745fe5d231c08ecdfc33a4a67389990
BLAKE2b-256 764372321f13116662763599177e778f5d538435fb7c83a041b4d70a4621b58d

See more details on using hashes here.

File details

Details for the file ensmallen-0.7.0.dev9-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for ensmallen-0.7.0.dev9-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 444901793932cc3c39959da236f5e6e28f15d71f238dbc9df4cccb0d3def2c30
MD5 b0b271defc5c059f683b807b6af9a90f
BLAKE2b-256 69580c19f089e122a9258d3f8143b878b97bfa06ace16cd1ca10d42126a9f9fe

See more details on using hashes here.

File details

Details for the file ensmallen-0.7.0.dev9-cp38-none-win_amd64.whl.

File metadata

  • Download URL: ensmallen-0.7.0.dev9-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 15.8 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.6

File hashes

Hashes for ensmallen-0.7.0.dev9-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 1205fb8bdc9c44ffe2012ed5d1578fd2b50f0bd0540e2cb1b84b6649f9c187e2
MD5 b6d49f190a4d3a9ae62aa0836e46d2e5
BLAKE2b-256 f5457032cfa144ba5cb883722f19090f277ce71d5435f1bb6b909637af334674

See more details on using hashes here.

File details

Details for the file ensmallen-0.7.0.dev9-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for ensmallen-0.7.0.dev9-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 601db26173d27d1ca2b8fbdb3bcf58a0134d7599228e4e3a0aeb3aced18dd36f
MD5 b8161020930d739e0260792105d5a803
BLAKE2b-256 b602d17b3efe30c89fa3844c2219dcb4c72e46b49dacf87cfb8ddb15523bf572

See more details on using hashes here.

File details

Details for the file ensmallen-0.7.0.dev9-cp37-none-win_amd64.whl.

File metadata

  • Download URL: ensmallen-0.7.0.dev9-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 15.7 MB
  • Tags: CPython 3.7, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.6

File hashes

Hashes for ensmallen-0.7.0.dev9-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 a929e46bb00d71d7da699c94af643ac177b987a3324626c314caaabd07195aa3
MD5 e530302c2f0b8537b8980f0f098cf69c
BLAKE2b-256 aeb78245a7042f26107cc24fff5edc94f7ee8487ffeb97f8f53483ae4aa5f529

See more details on using hashes here.

File details

Details for the file ensmallen-0.7.0.dev9-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for ensmallen-0.7.0.dev9-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 5d4f9e08376c2a60d84c442fad7e0c33ddd760edf512bc9ee5e4307fcf7d0dba
MD5 c4a6fdf98774b770412784876cc53973
BLAKE2b-256 f1708a591a4454dc9ca1646e2d38cce3b2b85d154e489ea1afa9e01e8083f58f

See more details on using hashes here.

File details

Details for the file ensmallen-0.7.0.dev9-cp36-none-win_amd64.whl.

File metadata

  • Download URL: ensmallen-0.7.0.dev9-cp36-none-win_amd64.whl
  • Upload date:
  • Size: 15.7 MB
  • Tags: CPython 3.6, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.6

File hashes

Hashes for ensmallen-0.7.0.dev9-cp36-none-win_amd64.whl
Algorithm Hash digest
SHA256 ee338f7c8311df4c26e1313631ba84ad28153068593792f0c00207de43c5619d
MD5 67fe79a8a16762710f0b768fee7db328
BLAKE2b-256 1a57a9a0afb5fb10c22b7cf84348711f0bde23ee15025ee356e3766c9b920946

See more details on using hashes here.

File details

Details for the file ensmallen-0.7.0.dev9-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for ensmallen-0.7.0.dev9-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 ae4e314be19b72c45c5d55f9e6369a7c67e4f7847b73a3ac6a7687435f6576fa
MD5 e551b17aa18ede22e8c04d785c30a0b5
BLAKE2b-256 ea5041e2a29684b5e95af0d927ad3dc4fbe1eb896a0116908c4bfe4c94a24ddb

See more details on using hashes here.

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