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
Built Distributions
File details
Details for the file ensmallen-0.7.0.dev6-cp310-none-win_amd64.whl
.
File metadata
- Download URL: ensmallen-0.7.0.dev6-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.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9dbf55c81c45a29de26719374aada56dd63ef2160482026c4bc30dfa4afed300 |
|
MD5 | 07f3835527b9be08a87f4bb3d15ae68a |
|
BLAKE2b-256 | 3b290232869711537384ccb1ec7c159258ebc261e2eda2b93eadf2485006a8a1 |
File details
Details for the file ensmallen-0.7.0.dev6-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: ensmallen-0.7.0.dev6-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 16.9 MB
- Tags: CPython 3.10, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78ab0b51a5148151dea093ee5aeb6a3adc138357e0400d75641f9695dc740ffc |
|
MD5 | d1e266ce15807ea1179c79c3db2ee9d2 |
|
BLAKE2b-256 | 33a85b9b1556ecc360e4ec44a536fca71ee005b799e74d4b32116e5e401e8d54 |
File details
Details for the file ensmallen-0.7.0.dev6-cp39-none-win_amd64.whl
.
File metadata
- Download URL: ensmallen-0.7.0.dev6-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.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cc79f1b0c565482547942379edc4f81f28d5fc16df51581644795e545a5e32d |
|
MD5 | df21f55537881bfcf5892c4dc92d9d55 |
|
BLAKE2b-256 | 83bc4c32d301e76e69f967625d3ece83d3b083f59e9b4d69b3bebc3ac5612d54 |
File details
Details for the file ensmallen-0.7.0.dev6-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: ensmallen-0.7.0.dev6-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 16.9 MB
- Tags: CPython 3.9, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a17d62533a4b79afc5a94e41920dfc425259ab65552702f20bf6d09b19d0d51 |
|
MD5 | 5ff2615b7a5acbe8eca350d301ad4bd7 |
|
BLAKE2b-256 | e528114e8d381c5885057eadd48552eb9faf05bfff4a5455de3f16c0c395d1ea |
File details
Details for the file ensmallen-0.7.0.dev6-cp39-cp39-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: ensmallen-0.7.0.dev6-cp39-cp39-macosx_10_7_x86_64.whl
- Upload date:
- Size: 14.6 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.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 689983a1aa9bc24cced2ee57ac99fe97262b935e5532bce23840c1fbd5f3a1ed |
|
MD5 | aaca4e9dff460542dec3a826a841e0bd |
|
BLAKE2b-256 | b84fac527c66a3064bc450b81296ac633ab17cd4d1058869f496d7b43186a3f8 |
File details
Details for the file ensmallen-0.7.0.dev6-cp38-none-win_amd64.whl
.
File metadata
- Download URL: ensmallen-0.7.0.dev6-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.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 971a12c632489f8a4252e72b0410c89fb15430cf6d537abcbba040c4a6c13f0a |
|
MD5 | 10b572e22e08535a2c541b0687aeac83 |
|
BLAKE2b-256 | 5953d4557240e4341f4e63deca0565b2027dd61a8f179d1b99bdbb0a514e5295 |
File details
Details for the file ensmallen-0.7.0.dev6-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: ensmallen-0.7.0.dev6-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 16.9 MB
- Tags: CPython 3.8, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 032626bb8024daf3b0f6e7d58ddcabb47fc1bfb673114cd1cdd915e61b616c86 |
|
MD5 | 3472c2c00d91925e1c7972042df68440 |
|
BLAKE2b-256 | 4aec175c080c2a8d446b152f332bbf9f859b0cabc40afc66177e81147900e795 |
File details
Details for the file ensmallen-0.7.0.dev6-cp38-cp38-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: ensmallen-0.7.0.dev6-cp38-cp38-macosx_10_7_x86_64.whl
- Upload date:
- Size: 14.6 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.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c4539a120532137a4b4635a81d0243b4879c29ad4eaba20c08b8f8cc037db40 |
|
MD5 | ef8e03fa88cdd6627e9f6a9e235038e8 |
|
BLAKE2b-256 | 03af121e8e75d7735a6e21e9d3685c7a870466836339e928e71c36241ffd7a39 |
File details
Details for the file ensmallen-0.7.0.dev6-cp37-none-win_amd64.whl
.
File metadata
- Download URL: ensmallen-0.7.0.dev6-cp37-none-win_amd64.whl
- Upload date:
- Size: 15.8 MB
- Tags: CPython 3.7, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | caf655e9088fd5cb8126293ec7516e64285efbc990c9c8d8457638dc36667275 |
|
MD5 | 551359f8f03be6150667d8165bb7f5e1 |
|
BLAKE2b-256 | 4ec4687785859549eec063814ba7c4b8601b2bb30806b6c6d17e2946b04f33b1 |
File details
Details for the file ensmallen-0.7.0.dev6-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: ensmallen-0.7.0.dev6-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 16.9 MB
- Tags: CPython 3.7m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c140dc539f09294e4668098b611d347cbe426b37d886e38a6e3c377e5243e67 |
|
MD5 | a6d9247754bff94a0868e28c43547678 |
|
BLAKE2b-256 | 861eb5293006bbf51768df84ec135930b382f10231953010bc97a77392687a1d |
File details
Details for the file ensmallen-0.7.0.dev6-cp37-cp37m-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: ensmallen-0.7.0.dev6-cp37-cp37m-macosx_10_7_x86_64.whl
- Upload date:
- Size: 14.6 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.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67fa337ea3977576aca460c63cae8ac5ffaf9703621ab2dac762dbeb6b9b1738 |
|
MD5 | 02beaba9c6a6322e917b8690f5bb7f7f |
|
BLAKE2b-256 | f64b7aedf9cd4dcc2511d71f7cafb11c2f0edeb112d2a28425750f681f8d5b82 |
File details
Details for the file ensmallen-0.7.0.dev6-cp36-none-win_amd64.whl
.
File metadata
- Download URL: ensmallen-0.7.0.dev6-cp36-none-win_amd64.whl
- Upload date:
- Size: 15.8 MB
- Tags: CPython 3.6, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58dc87adacb45ae67df96dfde8be68f25d26eb70638d11781d1ea43fb857d5da |
|
MD5 | 26b58a07bc567b151fa80756d2b7c61d |
|
BLAKE2b-256 | 300e032255bd595ea1b67086501e9e398a72564bc01d6cccd08dd4bed294d63c |
File details
Details for the file ensmallen-0.7.0.dev6-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
.
File metadata
- Download URL: ensmallen-0.7.0.dev6-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
- Upload date:
- Size: 16.9 MB
- Tags: CPython 3.6m, manylinux: glibc 2.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b27ec3cde09143e975d7e1c79e0a44fa78f801ef51fc2cf22eac8b175b9bc26f |
|
MD5 | 9e1cf4d84b37dc14cbe26756d39c8fbc |
|
BLAKE2b-256 | bd711360b4b1d4a4400439261e5abe3510bd8db6623ac10af296548c89162a12 |
File details
Details for the file ensmallen-0.7.0.dev6-cp36-cp36m-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: ensmallen-0.7.0.dev6-cp36-cp36m-macosx_10_7_x86_64.whl
- Upload date:
- Size: 14.6 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.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b36a9583266d55b2f2697711bc67847abcc265880b3eb595e44a564fd9a4c46 |
|
MD5 | d4af4689453510ed6952788339a86608 |
|
BLAKE2b-256 | 331f974f7fa43efdcc19e9dbd09f0da2f64516d00265964c10e9215d5f0df475 |