Open JoelHBierman opened 1 year ago
You forgot to mention you're using Miniconda
...
Old Python 3.9 Miniconda
versions have corrupt CFLAGS
configuration for arm64
that's causing binary extension builds to break.
You said you're using 3.9.6
, which is quite old.
Seems like versions up to Python 3.9.12
shipping with Miniconda 4.12.0
is broken, so you'd want something newer than that (22.11.1-1
or newer).
Upgrade to the latest 3.9
release and try again, I believe it should fix it for you :)
To reproduce:
docker run --rm -it --init --platform linux/arm64 fedora:38
# In container:
dnf install -y gcc
cd /tmp
curl -O https://repo.anaconda.com/miniconda/Miniconda3-py39_4.12.0-Linux-aarch64.sh
chmod +x Miniconda3-py39_4.12.0-Linux-aarch64.sh && ./Miniconda3-py39_4.12.0-Linux-aarch64.sh
# Install with default settings
. /root/miniconda3/bin/activate
pip install psutil
Hey im having a similar issue, when building docker container using GitHub actions:
I get the following error:
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=596 -DPy_LIMITED_API=0x03060000 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -DPSUTIL_LINUX=1 -I/usr/local/include/python3.9 -c psutil/_psutil_common.c -o build/temp.linux-aarch64-cpython-39/psutil/_psutil_common.o
#14 166.7 psutil could not be installed from sources because gcc is not installed. Try running:
#14 166.7 sudo apt-get install gcc python3-dev
#14 166.7 error: command 'gcc' failed: No such file or directory
#14 166.7 [end of output]
UPDATE:
I ended up just installing python3 dev and gcc in my docker image:
RUN apt-get update && apt-get -y install gcc python3-dev
Summary
Description
Running the commands given in the install instructions:
fails with trackback: