Thank you very much. I will install the same.
Original Message:
Sent: Mon August 07, 2023 06:24 AM
From: Ayappan P
Subject: Python Version - Python 3.7.12 - Unable to install psutil module due to gcc not found error
psutil 5.9.0 (rpm name is python3-psutil) is already available in AIX Toolbox.
------------------------------
Ayappan P
Original Message:
Sent: Mon August 07, 2023 06:08 AM
From: Satish Krishnamurthy
Subject: Python Version - Python 3.7.12 - Unable to install psutil module due to gcc not found error
Hi Sanket,
Thank you for the recommendation. We will upgrade to Python 3.9
Thanks
------------------------------
Satish Krishnamurthy
Original Message:
Sent: Mon August 07, 2023 12:53 AM
From: SANKET RATHI
Subject: Python Version - Python 3.7.12 - Unable to install psutil module due to gcc not found error
Original Message:
Sent: 8/4/2023 10:51:00 AM
From: Satish Krishnamurthy
Subject: RE: Python Version - Python 3.7.12 - Unable to install psutil module due to gcc not found error
Hi Team,
We installed the devel rpm but encountered a different issue now.. Could you advise if it is related any GCC error. Also we are unable to find the latest GCC version under 8.3.0 (gcc-8.3.0-6) in AIX toolbox.. Could you suggest..
Installed GCC rpms:
-----------------------
libgcc-8.3.0-1.ppc
gcc-8.3.0-1.ppc
gcc-cpp-8.3.0-1.ppc
Error:
=======
building 'psutil._psutil_aix' extension
creating build/temp.aix-7.2-cpython-37
creating build/temp.aix-7.2-cpython-37/psutil
creating build/temp.aix-7.2-cpython-37/psutil/arch
creating build/temp.aix-7.2-cpython-37/psutil/arch/aix
gcc -maix64 -fPIC -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -I/usr/include -I/opt/freeware/include -I/opt/freeware/include/ncurses -DAIX_GENUINE_CPLUSCPLUS -D_LINUX_SOURCE_COMPAT -Wl,-brtl -O2 -fPIC -I/usr/include -I/opt/freeware/include -I/opt/freeware/include/ncurses -DAIX_GENUINE_CPLUSCPLUS -D_LINUX_SOURCE_COMPAT -Wl,-brtl -O2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=595 -DPSUTIL_AIX=1 -I/opt/freeware/include/python3.7m -c psutil/_psutil_aix.c -o build/temp.aix-7.2-cpython-37/psutil/_psutil_aix.o
In file included from /usr/include/sys/resource.h:57,
from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.3.0/include-fixed/sys/wait.h:56,
from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.3.0/include-fixed/stdlib.h:391,
from /opt/freeware/include/python3.7m/Python.h:34,
from psutil/_psutil_aix.c:31:
/usr/include/sys/time.h:110:16: error: redefinition of 'struct sigset_t'
typedef struct sigset_t {
^~~~~~~~
In file included from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.3.0/include-fixed/stdio.h:503,
from /opt/freeware/include/python3.7m/Python.h:25,
from psutil/_psutil_aix.c:31:
/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.3.0/include-fixed/sys/types.h:345:16: note: originally defined here
typedef struct sigset_t {
^~~~~~~~
In file included from /usr/include/sys/resource.h:57,
from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.3.0/include-fixed/sys/wait.h:56,
from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.3.0/include-fixed/stdlib.h:391,
from /opt/freeware/include/python3.7m/Python.h:34,
from psutil/_psutil_aix.c:31:
/usr/include/sys/time.h:126:3: error: conflicting types for 'sigset_t'
} sigset_t;
^~~~~~~~
In file included from /opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.3.0/include-fixed/stdio.h:503,
from /opt/freeware/include/python3.7m/Python.h:25,
from psutil/_psutil_aix.c:31:
/opt/freeware/lib/gcc/powerpc-ibm-aix7.2.0.0/8.3.0/include-fixed/sys/types.h:361:3: note: previous declaration of 'sigset_t' was here
} sigset_t;
^~~~~~~~
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for psutil
Failed to build psutil
ERROR: Could not build wheels for psutil, which is required to install pyproject.toml-based projects
------------------------------
Satish Krishnamurthy
Original Message:
Sent: Fri August 04, 2023 01:59 AM
From: Satish Krishnamurthy
Subject: Python Version - Python 3.7.12 - Unable to install psutil module due to gcc not found error
Hi Reshma,
It seems the rpm package python3-devel is not installed.. We will try installing the rpm and share the updates.
Thank you for the quick help.
Thanks
------------------------------
Satish Krishnamurthy
Original Message:
Sent: Fri August 04, 2023 01:37 AM
From: RESHMA KUMAR
Subject: Python Version - Python 3.7.12 - Unable to install psutil module due to gcc not found error
Do you have python3-devel rpm installed?
If not, please install it.
------------------------------
RESHMA KUMAR
Original Message:
Sent: Thu August 03, 2023 11:45 PM
From: Satish Krishnamurthy
Subject: Python Version - Python 3.7.12 - Unable to install psutil module due to gcc not found error
Hi Team,
We have fixed the gcc error by installing the below rpm binaries. Now we are encountering another issue while installing the psutil module.
Could you suggest with your recommendations.
gcc-8.3.0-1.ppc
gcc-cpp-8.3.0-1.ppc
psutil error:
---------------
Building wheels for collected packages: psutil
Building wheel for psutil (pyproject.toml): started
Building wheel for psutil (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
Building wheel for psutil (pyproject.toml) did not run successfully.
exit code: 1
[47 lines of output]
..........
running build_ext
building 'psutil._psutil_aix' extension
creating build/temp.aix-7.2-cpython-37
creating build/temp.aix-7.2-cpython-37/psutil
creating build/temp.aix-7.2-cpython-37/psutil/arch
creating build/temp.aix-7.2-cpython-37/psutil/arch/aix
gcc -maix64 -fPIC -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -I/usr/include -I/opt/freeware/include -I/opt/freeware/include/ncurses -DAIX_GENUINE_CPLUSCPLUS -D_LINUX_SOURCE_COMPAT -Wl,-brtl -O2 -fPIC -I/usr/include -I/opt/freeware/include -I/opt/freeware/include/ncurses -DAIX_GENUINE_CPLUSCPLUS -D_LINUX_SOURCE_COMPAT -Wl,-brtl -O2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=595 -DPSUTIL_AIX=1 -I/opt/freeware/include/python3.7m -c psutil/_psutil_aix.c -o build/temp.aix-7.2-cpython-37/psutil/_psutil_aix.o
psutil/_psutil_aix.c:31:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for psutil
Failed to build psutil
ERROR: Could not build wheels for psutil, which is required to install pyproject.toml-based projects
------------------------------
Satish Krishnamurthy
Original Message:
Sent: Thu August 03, 2023 06:00 AM
From: Satish Krishnamurthy
Subject: Python Version - Python 3.7.12 - Unable to install psutil module due to gcc not found error
Dear Experts,
We are running python version 3.7.12. Currently we are trying to install the module "psutil". The installation fails with the below error.
Could you please suggest how to install the psutil module and resolve the gcc issue.
It seems then gcc rpm is installed.. But when I execute gcc --version. it says not found.
# gcc
sh: gcc: not found.
# rpm -qa | grep -i gcc
libgcc-8.3.0-1.ppc
libgcc6-6.3.0-1.ppc
Error Details:
------------------
building 'psutil._psutil_aix' extension
creating build/temp.aix-7.2-cpython-37
creating build/temp.aix-7.2-cpython-37/psutil
creating build/temp.aix-7.2-cpython-37/psutil/arch
creating build/temp.aix-7.2-cpython-37/psutil/arch/aix
gcc -maix64 -fPIC -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -I/usr/include -I/opt/freeware/include -I/opt/freeware/include/ncurses -DAIX_GENUINE_CPLUSCPLUS -D_LINUX_SOURCE_COMPAT -Wl,-brtl -O2 -fPIC -I/usr/include -I/opt/freeware/include -I/opt/freeware/include/ncurses -DAIX_GENUINE_CPLUSCPLUS -D_LINUX_SOURCE_COMPAT -Wl,-brtl -O2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=595 -DPSUTIL_AIX=1 -I/opt/freeware/include/python3.7m -c psutil/_psutil_aix.c -o build/temp.aix-7.2-cpython-37/psutil/_psutil_aix.o
error: command 'gcc' failed: No such file or directory: 'gcc'
----------------------------------------
ERROR: Failed building wheel for psutil
Failed to build psutil
ERROR: Could not build wheels for psutil which use PEP 517 and cannot be installed directly
------------------------------
Satish Krishnamurthy
------------------------------