我创建了anaconda环境
$ python --version
Python 3.7.13
$ pip --version
pip 22.2.2 from C:\tools\miniconda3\envs\py37\lib\site-packages\pip (python 3.7)在pyproject.toml,我有requires-python = ">=3.7"
[build-system]
requires = ["maturin>=0.13,<0.14"]
build-backend = "maturin"
[project]
name = "ecc_py"
requires-python = ">=3.7"
classifiers = [
"Programming Language :: Rust",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
]我运行maturin build
$ maturin build --release
Finished release [optimized] target(s) in 10.73s
Built wheel for CPython 3.10 to C:\Users\Aleksander\source\repos\Rust\ecc\target\wheels\ecc_py-0.1.0-cp310-none-win_amd64.whl但是轮子没能安装
$ pip install ..\target\wheels\ecc_py-0.1.0-cp310-none-win_amd64.whl
ERROR: ecc_py-0.1.0-cp310-none-win_amd64.whl is not a supported wheel on this platform.它成功地安装在conda环境python=3.10中。我做错了什么?它也应该与旧版本兼容。它在运行时工作。
$ maturin develop
Built wheel for CPython 3.7 to C:\Users\ALEKSA~1\AppData\Local\Temp\.tmpXTZvEE\ecc_py-0.1.0-cp37-none-win_amd64.whl
Installed ecc-py-0.1.0发布于 2022-10-26 07:28:41
所以它发现它与-i标志一起工作。
$ maturin build --release -i python
Finished release [optimized] target(s) in 6.33s
Built wheel for CPython 3.7 to C:\Users\Aleksander\source\repos\Rust\ecc\target\wheels\ecc_py-0.1.0-cp37-none-win_amd64.whl不过,我不知道为什么没有它就行不通。
https://stackoverflow.com/questions/74203888
复制相似问题