pip install atuopy failed

2.9k Views Asked by At
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.

enter image description here

I have tried upgrading pip, reinstalling setuptools_rust !
pip version:22.0.4
python version:Python 3.10.3
1

There are 1 best solutions below

2
On

It seems like there are no pre-built wheels for python 3.10 in the Autopy project page at PyPI.The latest support python 3.8.

So you will need to compile for your operating system.

From the documentation.First, see if a binary wheel is available for your machine by running:

$ pip install -U autopy

If that fails you'll need to install the rust compiler using rustc and then run:

$ rustup default nightly-2019-10-05
$ pip install -U setuptools-rust
$ pip install -U autopy

Another option is to build from the latest source on the GitHub repository:

$ git clone git://github.com/autopilot-rs/autopy-rs.git
$ cd autopy 
$ make 
$ make install