'why i cant pip install autopy?
Collecting autopy
Using cached autopy-4.0.0.tar.gz (20 kB)
Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for autopy, since package 'wheel' is not installed.
Installing collected packages: autopy
Running setup.py install for autopy ... error
ERROR: Command errored out with exit status 1:
command: 'c:\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Nitro 5\\AppData\\Local\\Temp\\pip-install-a48eed40\\autopy_364831de627945c491e2f14d454eac9f\\setup.py'"'"'; __file__='"'"'C:\\Users\\Nitro 5\\AppData\\Local\\Temp\\pip-install-a48eed40\\autopy_364831de627945c491e2f14d454eac9f\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Nitro 5\AppData\Local\Temp\pip-record-6f8m7fge\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\autopy'
cwd: C:\Users\Nitro 5\AppData\Local\Temp\pip-install-a48eed40\autopy_364831de627945c491e2f14d454eac9f\
Complete output (22 lines):
running install
c:\python39\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-3.9
creating build\lib.win-amd64-3.9\autopy
copying autopy\__init__.py -> build\lib.win-amd64-3.9\autopy
running build_ext
running build_rust
error: can't find Rust compiler
If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
To update pip, run:
pip install --upgrade pip
and then retry package installation.
If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Nitro 5\\AppData\\Local\\Temp\\pip-install-a48eed40\\autopy_364831de627945c491e2f14d454eac9f\\setup.py'"'"'; __file__='"'"'C:\\Users\\Nitro 5\\AppData\\Local\\Temp\\pip-install-a48eed40\\autopy_364831de627945c491e2f14d454eac9f\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\Nitro 5\AppData\Local\Temp\pip-record-6f8m7fge\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\autopy' Check the logs for full command output.
Solution 1:[1]
There is a known issue that for some reason wasn't fixed.
Issue: https://github.com/msanders/autopy/issues/75
It contains following workaround (commands to type in console):
brew install libpng
CFLAGS="-Wno-return-type" pip install git+https://github.com/potpath/autopy.git
Solution 2:[2]
This issue seems to be on Py3.9 but not Py3.8. I just tried both.
The https://pypi.org/project/autopy/ page gives info on how to install autopy in case the standard pip install autopy
fails.
According to that page:
First, see if a binary wheel is available for your machine by running:
$ pip install -U autopy
If that fails, install rustup [https://rustup.rs/] and then run:
$ rustup default nightly-2019-10-05
$ pip install -U setuptools-rust
$ pip install -U autopy
The above just did the trick for me on Py3.9.
Solution 3:[3]
I had several times to install autopy; I can't. Because my python version was 3.9; Only 3.8 can install autopy. I tried this and my autopy get installed.
If you want more versions of autopy, you checkout https://pypi.org/project/autopy/
Thanks.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Biswajit Paloi |
Solution 2 | Gary02127 |
Solution 3 | myNameisShourya |