psutil
psutil copied to clipboard
[AWS Graviton2] graviton gcc flags break pip install
Summary
- OS: Amazon Linux
- Architecture: ARM
- Psutil version: 5.9.0
- Python version: 3.9
- Type: installation
Description
I'm having trouble installing psutil
and packages that depend on it. It seems like it was meaning to run gcc -march=armv8.2-a+fp16+rcpc+dotprod+crypto _some_target_
, but instead an extra space sneaked in and the whole .2-a+fp16+rcpc...
part fell off. Anyone knows how to get around this?
Command ['/home/ec2-user/.cache/pypoetry/virtualenvs/env-FCAoHQDC-py3.9/bin/pip', 'install', '--no-deps', 'file:///home/ec2-user/.cache/pypoetry/artifacts/b1/56/ea/8f76ac8e3267dcd0b251a107803fa457585315936bb70ef39c1775c7d1/psutil-5.9.0.tar.gz'] errored with the following return code 1, and output:
Processing /home/ec2-user/.cache/pypoetry/artifacts/b1/56/ea/8f76ac8e3267dcd0b251a107803fa457585315936bb70ef39c1775c7d1/psutil-5.9.0.tar.gz
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: psutil
Building wheel for psutil (setup.py): started
Building wheel for psutil (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
running bdist_wheel
running build
running build_py
running build_ext
building 'psutil._psutil_linux' extension
gcc: error: .2-a+fp16+rcpc+dotprod+crypto: No such file or directory
gcc: error: .2-a+fp16+rcpc+dotprod+crypto: No such file or directory
gcc: error: unrecognized command line option ‘-n1’; did you mean ‘-n’?
gcc: error: unrecognized command line option ‘-n1’; did you mean ‘-n’?
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
also filed here https://github.com/aws/aws-graviton-getting-started/issues/208
More detailed error
building 'psutil._psutil_linux' extension
creating build/temp.linux-aarch64-3.9
creating build/temp.linux-aarch64-3.9/psutil
gcc -pthread -B /a/mc39/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /a/mc39/include -I/a/mc39/include -fPIC -O2 -n1 .2-a+fp16+rcpc+dotprod+crypto -isystem /a/mc39/include -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=590 -DPSUTIL_LINUX=1 -I/a/mc39/include/python3.9 -c psutil/_psutil_common.c -o build/temp.linux-aarch64-3.9/psutil/_psutil_common.o
gcc: error: .2-a+fp16+rcpc+dotprod+crypto: No such file or directory
gcc: error: .2-a+fp16+rcpc+dotprod+crypto: No such file or directory
gcc: error: unrecognized command line option ‘-n1’; did you mean ‘-n’?
gcc: error: unrecognized command line option ‘-n1’; did you mean ‘-n’?
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for psutil
same error here. 😭
Should be fixed after #1972
Are you using miniconda
(does mc39
stand for miniconda39
)? Seems like a bug with old 3.9
releases, try the latest one.
See #2293