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 Distribution

ensmallen-0.6.4.tar.gz (20.3 MB view details)

Uploaded Source

Built Distributions

ensmallen-0.6.4-cp39-cp39-manylinux2010_x86_64.whl (45.7 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

ensmallen-0.6.4-cp39-cp39-macosx_10_7_x86_64.whl (45.5 MB view details)

Uploaded CPython 3.9 macOS 10.7+ x86-64

ensmallen-0.6.4-cp38-cp38-manylinux2010_x86_64.whl (45.7 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

ensmallen-0.6.4-cp38-cp38-macosx_10_7_x86_64.whl (45.5 MB view details)

Uploaded CPython 3.8 macOS 10.7+ x86-64

ensmallen-0.6.4-cp37-cp37m-manylinux2010_x86_64.whl (45.5 MB view details)

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

ensmallen-0.6.4-cp37-cp37m-macosx_10_7_x86_64.whl (45.3 MB view details)

Uploaded CPython 3.7m macOS 10.7+ x86-64

ensmallen-0.6.4-cp36-cp36m-manylinux2010_x86_64.whl (45.5 MB view details)

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

ensmallen-0.6.4-cp36-cp36m-macosx_10_7_x86_64.whl (45.3 MB view details)

Uploaded CPython 3.6m macOS 10.7+ x86-64

File details

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

File metadata

  • Download URL: ensmallen-0.6.4.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.4.tar.gz
Algorithm Hash digest
SHA256 1217c2dd84e46686a43150958aa2f38e913cb4240c9050b795b783f3dd21e144
MD5 33d7d52dbc7029d2e0196ebf66128387
BLAKE2b-256 411dbbf8a2b0dae3988537f651ac1bcd19a45038f981a534edc8249756bf07ce

See more details on using hashes here.

Provenance

File details

Details for the file ensmallen-0.6.4-cp39-cp39-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ensmallen-0.6.4-cp39-cp39-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 45.7 MB
  • Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/57.4.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for ensmallen-0.6.4-cp39-cp39-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 1e8dea504ddfa0015629317000915e29714d4e918f3012456458a10fc091a712
MD5 f773909ed44934b580bdd2fb1f9967d7
BLAKE2b-256 b41a262f9c814ddfdb98b3a0b0e2e75f6dc393f5a0c59223a6c3b365dae9cd98

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ensmallen-0.6.4-cp39-cp39-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 45.5 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.4-cp39-cp39-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 d81337ce9537d926a50da66a98452e3700e9962e1b202f5ec80eb7c34063948c
MD5 50b3d5e7f4db0d9462e42636b178882a
BLAKE2b-256 3282be81d3dfa14b6b99bf1c3aeeaeb4ff5ace20fc65b969a36db57929c5318f

See more details on using hashes here.

Provenance

File details

Details for the file ensmallen-0.6.4-cp38-cp38-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ensmallen-0.6.4-cp38-cp38-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 45.7 MB
  • Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/57.4.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for ensmallen-0.6.4-cp38-cp38-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 9e1bbcdb6003168210f25bd3582757d3e190895670e11e25543329486885cfee
MD5 1fa7fa6d809ed02648e00f9c30645309
BLAKE2b-256 7f29abeb31e33078da2073e9c3e98b49de3551d3a938b3a2338a73fae0884c1f

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ensmallen-0.6.4-cp38-cp38-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 45.5 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.4-cp38-cp38-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 d5e4f339ebcde5d67ffb434221377d1fbcd463eae4b9fbaa2b16e4afa1e2e2a4
MD5 ce146a80fe2f159a546901667e098656
BLAKE2b-256 de77a7b588e82080410800430e2c2a51af8a6b49c3c233193476921fed630f14

See more details on using hashes here.

Provenance

File details

Details for the file ensmallen-0.6.4-cp37-cp37m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ensmallen-0.6.4-cp37-cp37m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 45.5 MB
  • Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/57.4.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for ensmallen-0.6.4-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 47d223cfd20ab6a34d4a9ba19c74fce6eaa67a919e882267b262f174b36bcf5c
MD5 1a93cc4f4fe9cf64b5cf5379f0fbe859
BLAKE2b-256 74215d6e153b5848d926bd610a04c396de407888de6ab641b8a833e664897df2

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ensmallen-0.6.4-cp37-cp37m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 45.3 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.4-cp37-cp37m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 f3468423f838272df1cf5f79dc28668b5eb6cba15c72483e21cd64fdd4c44d9b
MD5 f9fc11be41c24c03e6b31ff7ba223d2c
BLAKE2b-256 86b20b3b78f8273c6b19fcd8e827dc9699bacf862f5d2f87970d5f26db3f7b47

See more details on using hashes here.

Provenance

File details

Details for the file ensmallen-0.6.4-cp36-cp36m-manylinux2010_x86_64.whl.

File metadata

  • Download URL: ensmallen-0.6.4-cp36-cp36m-manylinux2010_x86_64.whl
  • Upload date:
  • Size: 45.5 MB
  • Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.24.0 setuptools/57.4.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5

File hashes

Hashes for ensmallen-0.6.4-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 5d91a989c3a1a07d2b5940de71efb51775418952b046828b72790a6b1ae65971
MD5 20687f3ad9914b0abc04927cad5050d4
BLAKE2b-256 d9b4b37ba946bb0debe06c491e89341cedb330d1292adbedf290bd0f39ece0f1

See more details on using hashes here.

Provenance

File details

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

File metadata

  • Download URL: ensmallen-0.6.4-cp36-cp36m-macosx_10_7_x86_64.whl
  • Upload date:
  • Size: 45.3 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.4-cp36-cp36m-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 99ee5fc159bdea4d80d8b4320e67cc43f7ad62490ac65999b235ca5250a4860a
MD5 3bcf1d18b212ff0c7b9bc712b52856f1
BLAKE2b-256 789cdcc23c86d36fdd7d24eaf53f37b001210ab3c19019291b3fc8b8684645cc

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