# 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:
```bash
pip install ensmallen_graph
```
## 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:
```bash
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
Ubuntu 16.04 .
# Exploiting Avx
The library vec_rand which is used in the crate can take advantage in using Avx instructions/
To compile the bindings with Avx Instructions you can run :
```bash
RUSTFLAGS=" -C target-cpu=native" maturin build --release --no-sdist
```
PyPI 官网下载 | ensmallen_graph-0.2.3.tar.gz
版权申诉
49 浏览量
2022-01-11
19:11:24
上传
评论
收藏 10KB GZ 举报
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
最新资源
- keil2 + proteus + 8051.exe
- 1961ee27df03bd4595d28e24b00dde4e_744c805f7e4fb4d40fa3f695bfbab035_8(1).c
- mediapipe-0.9.0.1-cp37-cp37m-win-amd64.whl.zip
- windows注册表编辑工具
- mediapipe-0.9.0.1-cp37-cp37m-win-amd64.whl.zip
- 校园通行码预约管理系统20240522075502
- 车类型数据集6250张VOC+YOLO格式.zip
- The PyTorch implementation of STGCN.STGCN-main.zip
- 092300108.cpp
- 车类型数据集6000张VOC+YOLO格式.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈