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

This version

0.6.6

Download files

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

Source Distribution

ensmallen-0.6.6.tar.gz (16.1 MB view details)

Uploaded Source

Built Distributions

ensmallen-0.6.6-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (42.5 MB view details)

Uploaded PyPy manylinux: glibc 2.12+ x86-64

ensmallen-0.6.6-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (42.5 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.12+ x86-64

ensmallen-0.6.6-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (42.5 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

ensmallen-0.6.6-cp39-cp39-macosx_10_7_x86_64.whl (42.4 MB view details)

Uploaded CPython 3.9 macOS 10.7+ x86-64

ensmallen-0.6.6-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (42.5 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

ensmallen-0.6.6-cp38-cp38-macosx_10_7_x86_64.whl (42.4 MB view details)

Uploaded CPython 3.8 macOS 10.7+ x86-64

ensmallen-0.6.6-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (42.5 MB view details)

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

ensmallen-0.6.6-cp37-cp37m-macosx_10_7_x86_64.whl (42.4 MB view details)

Uploaded CPython 3.7m macOS 10.7+ x86-64

ensmallen-0.6.6-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (42.5 MB view details)

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

ensmallen-0.6.6-cp36-cp36m-macosx_10_7_x86_64.whl (42.4 MB view details)

Uploaded CPython 3.6m macOS 10.7+ x86-64

File details

Details for the file ensmallen-0.6.6.tar.gz.

File metadata

  • Download URL: ensmallen-0.6.6.tar.gz
  • Upload date:
  • Size: 16.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.8

File hashes

Hashes for ensmallen-0.6.6.tar.gz
Algorithm Hash digest
SHA256 381baf68a6341745c2a738aff4e61d2367445d1e3b92c8e180375b339075c208
MD5 8f9f25c36ec5d094b555ad93b8dcecf5
BLAKE2b-256 f02fc34828d5e3ee97d2d27102813440c373878569faf734250cb89036546ca3

See more details on using hashes here.

Provenance

File details

Details for the file ensmallen-0.6.6-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for ensmallen-0.6.6-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 427d6536713eb51185c3fae7bbff89dc816ecc3a5a875ba29724a31b2b8e4319
MD5 621bba2a5b23fd7dfdea5395c8150331
BLAKE2b-256 6fcecb7a183e13b9c8dd27d9818a3f24cb24f9e39eefc75204c1fcb1e000e8c1

See more details on using hashes here.

Provenance

File details

Details for the file ensmallen-0.6.6-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for ensmallen-0.6.6-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 1a20fb67a857540f2caff67eef535e15074f8caa70fbd4d65e8a80d50f98000d
MD5 b69b0594aed8681004aee5e95bdfbea8
BLAKE2b-256 0779a1c79daa27bbd3e6836d6f94a3fb80afee759dc54bd03d6c0dfb9d5ce847

See more details on using hashes here.

Provenance

File details

Details for the file ensmallen-0.6.6-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for ensmallen-0.6.6-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 121694c2d7d6a69db3e25e626a6d5b468c0e84928357796313b408e6fcdd782e
MD5 e04855dde8dfff4cb7848eb83e047271
BLAKE2b-256 6a212a48d7728685718c0a8167ce85179ad64746fbab7d4a680be89c993a8293

See more details on using hashes here.

Provenance

File details

Details for the file ensmallen-0.6.6-cp39-cp39-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: ensmallen-0.6.6-cp39-cp39-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 42.4 MB
  • Tags: CPython 3.9, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.10

File hashes

Hashes for ensmallen-0.6.6-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 a6daf32fb60d176525731cbcb138c9d060eb0c718f5702f54db8bffb153e663d
MD5 15e88416b8e75c76569dae6d70e1b2aa
BLAKE2b-256 3a41243290379bbe701b9246d3095385f36f92ebcfe7e61687b7d9a9ac15109e

See more details on using hashes here.

Provenance

File details

Details for the file ensmallen-0.6.6-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for ensmallen-0.6.6-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 bf2cca70128a5577887345c5f6fc7b7ceb1ebf9622bebdcfc915c8084acd0664
MD5 f3705bbd0a3c4ad498891eb3219541a0
BLAKE2b-256 fe767e54c8973be624bb1ab39b5c8879b183401241f3164a81b479a4f4cf3599

See more details on using hashes here.

Provenance

File details

Details for the file ensmallen-0.6.6-cp38-cp38-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: ensmallen-0.6.6-cp38-cp38-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 42.4 MB
  • Tags: CPython 3.8, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.10

File hashes

Hashes for ensmallen-0.6.6-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 b2eedcf8d70c64b0dccf19108b452b30ae89e9534cbb691b2fbe1b768fa7740b
MD5 024aaaaadd25ed5fbb20b79aae930027
BLAKE2b-256 826712a4c309c92bf38010ab3297a4e6d20dc91dbe943eb3aa95b1c7fa4784ba

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for ensmallen-0.6.6-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 0b83ce9b4f3cd77cf56e75012f9f0cdef6d45fa2424a50fde0b885bd98df2151
MD5 93c589f6994f0cd54aab85940fd34b01
BLAKE2b-256 6c4f7dfb41bf29a833cfff6c2c5f04a5fcb7fc1db214b2b045b285bd14edebf5

See more details on using hashes here.

Provenance

File details

Details for the file ensmallen-0.6.6-cp37-cp37m-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: ensmallen-0.6.6-cp37-cp37m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 42.4 MB
  • Tags: CPython 3.7m, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.10

File hashes

Hashes for ensmallen-0.6.6-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 dc8a4a78328e9bb8394597e0dd921c0d814a015bb44731f62b292938fb25cb67
MD5 d77205701004a3d9e6f4143990680405
BLAKE2b-256 710fe5f0a6a05337afeaa98af1295c5d865a3d8d490338f5d414fa8439cb3e3d

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for ensmallen-0.6.6-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 6ff20e20a1e14c98677b1e39e3968a475e63c2246a30fbbe30cce66d80e7f0c8
MD5 8c813c574abd7cb97b43c2be42c575e9
BLAKE2b-256 3741c3e4daf0ee60966df8474aef7f87dc29d427fe1fff98d98b17c83b4f1d67

See more details on using hashes here.

Provenance

File details

Details for the file ensmallen-0.6.6-cp36-cp36m-macosx_10_7_x86_64.whl.

File metadata

  • Download URL: ensmallen-0.6.6-cp36-cp36m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 42.4 MB
  • Tags: CPython 3.6m, macOS 10.7+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.10

File hashes

Hashes for ensmallen-0.6.6-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 e976763b2704ee9f07658a4ca5ba4ac57b5a0dd53d07f25c3d29461164b50a9a
MD5 eb1ae90783c580f06ab613e769a9884a
BLAKE2b-256 91e64ec9acd3f0f72232fba389a015d8e6ed27aecaa758d8e726f2a397c15dfb

See more details on using hashes here.

Provenance

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