Python,在PyCharm中。无法安装autopy插件包,出现如图所示情况,请问该如何解决?
Collecting autopy
Using cached autopy-4.0.0.tar.gz (20 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status '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 "/private/var/folders/s7/k1xbsj5908gcm3llmltpm5kw0000gn/T/pip-install-5qnzx5z6/autopy_cc4e76d8606b4fe8907c5c938a94c337/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.
[notice] A new release of pip available: 22.3.1 -> 23.1
[notice] To update, run: pip install --upgrade pip
source /Users/xxxxxx/PycharmProjects/xxxxxx/venv/scripts/bin/activate
/Users/xxxxx/xxxxxx/venv/scripts/bin/Python /Applications/PyCharm CE.app/Contents/plugins/python-ce/helpers/packaging_tool.py install autopy
以下是更新pip后情况,依旧无法安装autopy
是环境python版本太高了。autopy需要的wheel到目前为止都只有适配python3.4~3.8.2换了py3.8.2后直接pip instal即可。若没有python较低版本可从python官网上下载。
使用命令行pip install autopy,如果还是不行就去下载包,本地安装