首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >maturin build不使用较早的python版本

maturin build不使用较早的python版本
EN

Stack Overflow用户
提问于 2022-10-26 07:10:14
回答 1查看 73关注 0票数 0

我创建了anaconda环境

代码语言:javascript
复制
$ 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"

代码语言:javascript
复制
[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

代码语言:javascript
复制
$ 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

但是轮子没能安装

代码语言:javascript
复制
$ 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中。我做错了什么?它也应该与旧版本兼容。它在运行时工作。

代码语言:javascript
复制
$ 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
EN

回答 1

Stack Overflow用户

发布于 2022-10-26 07:28:41

所以它发现它与-i标志一起工作。

代码语言:javascript
复制
$ 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

不过,我不知道为什么没有它就行不通。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74203888

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档