C:\\Users\\BoBo\>pip install autopy
Collecting autopy
Using cached autopy-4.0.0.tar.gz (20 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─\> \[6 lines of output\]
Traceback (most recent call last):
File "\<string\>", line 2, in \<module\>
File "\<pip-setuptools-caller\>", line 34, in \<module\>
File "C:\\Users\\BoBo\\AppData\\Local\\Temp\\pip-install-540ias0x\\autopy_48ff0273bf204c08bd6332db1d22716a\\setup.py", line 8, in \<module\>
from setuptools_rust import Binding, RustExtension
ModuleNotFoundError: No module named 'setuptools_rust'
\[end of output\]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─\> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
I have tried upgrading pip, reinstalling setuptools_rust !
pip version:22.0.4
python version:Python 3.10.3
发布于 2022-03-24 05:27:47
在尸检项目页面( PyPI.The最新支持python3.8)中,似乎没有为python3.10预先构建的车轮。
因此,您需要为您的操作系统编译。
在documentation.First中,通过运行以下命令查看机器是否可用二进制轮:
$ pip install -U autopy
如果失败,则需要使用铁锈安装生锈编译器,然后运行:
$ rustup default nightly-2019-10-05
$ pip install -U setuptools-rust
$ pip install -U autopy
另一种选择是从GitHub存储库的最新源代码构建:
$ git clone git://github.com/autopilot-rs/autopy-rs.git
$ cd autopy
$ make
$ make install
https://stackoverflow.com/questions/71597245
复制相似问题