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.5

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.5.tar.gz (20.3 MB view details)

Uploaded Source

Built Distributions

ensmallen-0.6.5-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.5-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.5-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.5-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.5-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.5-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.5-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.5-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.5-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.5-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.5.tar.gz.

File metadata

  • Download URL: ensmallen-0.6.5.tar.gz
  • Upload date:
  • Size: 20.3 MB
  • Tags: Source
  • 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.5.tar.gz
Algorithm Hash digest
SHA256 e681c754b3bfe05e1f106e194aaa6d2d8141d6781a1c972c86b5492a5d38c709
MD5 7e666edbdfd0007a8307cad51e379f47
BLAKE2b-256 6110a8eb55f54157667965fd504ce860ed5da072ec9d7c65516880c117020763

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for ensmallen-0.6.5-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 f9973740c373c22feaf329a377c6b9ab0b81112ba2279f4f202cfc4ebb286811
MD5 ab51a54837af923aaad1825bafe81616
BLAKE2b-256 4766688fe9b099e61c702ce960761a76b1c93b903a148b1b4eee93066d796d7e

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for ensmallen-0.6.5-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 d5b21ba60c00c543dd803030d6a14264a087b42e5a8030210e373d8fdb93aa01
MD5 4c988676e0154d27455bc113417aa3f6
BLAKE2b-256 d84dd34cdc6d907ac2001ea671f6529da77c8ff888f8b4c63dee9bce1df94807

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for ensmallen-0.6.5-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 4d28ba382f17a9a08813bcfd2df6e374ec80e4820803d3715af8a36ea6c1ec89
MD5 13b8f8f6eb48d0862576612133ba5a46
BLAKE2b-256 86f5a61f2376d034fb1b98298cc6dbef13421cbf61ff5b6a08e87473ed139e88

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ensmallen-0.6.5-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.5-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 e3e12cf19f4934096d7f617b68bf4d6a64f339f9255198ef497eb5ed6d34ef58
MD5 e5b1bbab57dc8ce84e24de5785a2c80e
BLAKE2b-256 8b972f3b9889b55eca3c0c9c398e5688b4225f49d6a3e1cd99f683d6ebab00fe

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for ensmallen-0.6.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 51a3696269f3a0f80e2c6478470a0e7f0ea9d97854c5ac6e80b37ba2c427cdfb
MD5 cf219913b0ba6e6516a42c174c383813
BLAKE2b-256 b29863e36f9bb9470eccd0ab855ba401b21be09f8134527b4a95cace3585eb78

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ensmallen-0.6.5-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.5-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 1877ab88d8d21a9a3d2ab1f121c0a77e9184a8812b07a312286279d29ffef733
MD5 a984608afd1b8e2f31659d951291f3c2
BLAKE2b-256 dcf57895e6e798d39913987fd173676c42e2da9e4f3dd26e03514d26748a5ca9

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for ensmallen-0.6.5-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 7734f37e465c403a33f83becb9ddf83809bb6c45d5863c1740e6d79ca47277f8
MD5 468dba87e825dadd52793008d1582cb7
BLAKE2b-256 5669ef4a18b2c289b2ed82bc699de62cdf82b6fb56aea2be14e76ef0e5355179

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ensmallen-0.6.5-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.5-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 b5116a51dfb7a0c24f2983b48f6142e7b7b6120899c6b802fa876b01f672b17e
MD5 1078b05ca458b933ccc803d244243b1a
BLAKE2b-256 b8e1656a5b2550d7a5a4a3ebd5f6ec53e7f4bdb7de7a0107b99383d50f3511a3

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for ensmallen-0.6.5-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 fa465bea44247e1c39f8778d68e215778dee8401bd9d52e72899bb6b652271da
MD5 fc65b49274c25f6e5333f77e3b18db9c
BLAKE2b-256 3d9bc11dd377b945ebfc6641692a12d6569db24b7adfe667890e7c8ea803daee

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ensmallen-0.6.5-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.5-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 a1fe27926caba3bbf752e2eb720f7a8be857a0b7336075127c9c05ca525c3e46
MD5 2f6b368c5b470d9ae78fea34d17cf6cc
BLAKE2b-256 7add77d8ae79f23ed0c03837046a285ded3931ccc08350eaac051d99d1bd0670

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