You used "su root" from non-root user and then tried installing it ? If so, that is not the right way to do that. You have to login as root user and do that.
Original Message:
Sent: Tue May 21, 2024 08:23 AM
From: Subba Reddy Reddem
Subject: Python module error in AIX 7.3
Hi Ayappan,
It worked and I am able to install pyRXP.
bash-5.2# pip3 list |grep pyRXP
pyRXP 3.0.1
But i am getting another error.
import pyRXPU
ImportError: Permission denied
------------------------------
Subba Reddy Reddem
Original Message:
Sent: Tue May 21, 2024 07:36 AM
From: Ayappan P
Subject: Python module error in AIX 7.3
You didn't shared the exact error message. You should invoke "/usr/opt/python3/bin/python3 -m pip install ." command inside pyRXP-3.0.1 directory.
------------------------------
Ayappan P
Original Message:
Sent: Tue May 21, 2024 04:03 AM
From: Subba Reddy Reddem
Subject: Python module error in AIX 7.3
Hi Ayappan,
I have downloaded the pyRXP-3.0.1.tar.gz from the pyRXP · PyPI website and i have edited the system.h file.
bash-5.2# cat system.h
#include<Python.h>
#ifndef _RXP_SYSTEM_H
#define _RXP_SYSTEM_H
#define SOCKETS_IMPLEMENTED
#define HAVE_LONG_LONG_INT
and ran the command /usr/opt/python3/bin/python3 -m pip install pyRXP from the main path and still getting the same error.
error: command '/opt/IBM/xlC/13.1.3/bin/xlc_r' 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 pyRXP
Failed to build pyRXP
ERROR: Could not build wheels for pyRXP, which is required to install pyproject.toml-based projects
------------------------------
Subba Reddy Reddem
Original Message:
Sent: Tue May 21, 2024 02:41 AM
From: Ayappan P
Subject: Python module error in AIX 7.3
What I am saying is, download pyRXP source tar file from pypi site, extract and modify the "src/rxp/system.h" file (add "#include<Python.h>" in the top), then invoke "/usr/opt/python3/bin/python3 -m pip install . " from the main directory.
------------------------------
Ayappan P
Original Message:
Sent: Mon May 20, 2024 11:13 AM
From: Subba Reddy Reddem
Subject: Python module error in AIX 7.3
Hi Ayyappan,
The python which is installed in this server is came with OS and we did not install separately.
------------------------------
Subba Reddy Reddem
Original Message:
Sent: Mon May 20, 2024 11:06 AM
From: Ayappan P
Subject: Python module error in AIX 7.3
Looks like their code is only supporting gcc.
File --> src/rxp/system.h
#ifndef PY_LONG_LONG
# if defined(__GNUC__)
# define PY_LONG_LONG long long
# endif
#endif
You have to download the source tar file from pypi site, extract it and then edit the above file (add just "#include<Python.h>"). Then do "/usr/opt/python3/bin/python3 -m pip install . " in the main directory
------------------------------
Ayappan P
Original Message:
Sent: Mon May 20, 2024 10:45 AM
From: Subba Reddy Reddem
Subject: Python module error in AIX 7.3
Hi Ayyappan,
I have done that also.
bash-5.2# PATH=$PATH:/opt/IBM/xlC/13.1.3/bin/
bash-5.2# export PATH
bash-5.2# PATH=$PATH:/compiler/xlcpp/opt/IBM/xlC/13.1.3/bin/
bash-5.2# export PATH
bash-5.2# echo $PATH
/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java8_64/jre/bin:/usr/java8_64/bin:/opt/CA/SharedComponents/bin:/opt/CA/SharedComponents/ccs/cam/bin:/opt/IBM/xlC/13.1.3/bin/:/compiler/xlcpp/opt/IBM/xlC/13.1.3/bin/
bash-5.2# cd /usr/opt/python3/bin
But I am getting another error.
xlc_r -q64 -qPIC -DNDEBUG -O2 -qmaxmem=-1 -I/usr/opt/python3/include -I/usr/include -D_ALL_SOURCE -D_LINUX_SOURCE_COMPAT -qbitfields=signed -qalloca -O2 -qmaxmem=-1 -I/usr/opt/python3/include -I/usr/include -D_ALL_SOURCE -D_LINUX_SOURCE_COMPAT -qbitfields=signed -qalloca -O2 -qmaxmem=-1 -DCHAR_SIZE=16 -I/tmp/pip-install-wgo26ct5/pyrxp_da0ef640f0724794b08d74671ef61695/src/rxp -I/usr/opt/python3/include/python3.9 -c /tmp/pip-install-wgo26ct5/pyrxp_da0ef640f0724794b08d74671ef61695/src/rxp/stdio16.c -o build/temp.aix-7302-2345-64-cpython-39/tmp/pip-install-wgo26ct5/pyrxp_da0ef640f0724794b08d74671ef61695/src/rxp/stdio16.o
"/tmp/pip-install-wgo26ct5/pyrxp_da0ef640f0724794b08d74671ef61695/src/rxp/stdio16.c", line 780.35: 1506-046 (S) Syntax error.
"/tmp/pip-install-wgo26ct5/pyrxp_da0ef640f0724794b08d74671ef61695/src/rxp/stdio16.c", line 780.24: 1506-098 (E) Missing argument(s).
"/tmp/pip-install-wgo26ct5/pyrxp_da0ef640f0724794b08d74671ef61695/src/rxp/stdio16.c", line 780.35: 1506-045 (S) Undeclared identifier PY_LONG_LONG.
"/tmp/pip-install-wgo26ct5/pyrxp_da0ef640f0724794b08d74671ef61695/src/rxp/stdio16.c", line 780.24: 1506-023 (S) Expecting function or pointer to function.
"/tmp/pip-install-wgo26ct5/pyrxp_da0ef640f0724794b08d74671ef61695/src/rxp/stdio16.c", line 780.35: 1506-277 (S) Syntax error: possible missing ';' or ','?
error: command '/opt/IBM/xlC/13.1.3/bin/xlc_r' failed with exit code 1
------------------------------
Subba Reddy Reddem
Original Message:
Sent: Mon May 20, 2024 10:43 AM
From: Ayappan P
Subject: Python module error in AIX 7.3
That is the problem. I would suggest you to put "/opt/IBM/xlC/13.1.3/bin" in your PATH variable (either in .profile or .bash_profile or /etc/environment according to your convenience) & re-login and start using it.
------------------------------
Ayappan P
Original Message:
Sent: Mon May 20, 2024 10:33 AM
From: Subba Reddy Reddem
Subject: Python module error in AIX 7.3
No it does not exists.
bash-5.2# ls -ld xlc_r*
ls: 0653-341 The file xlc_r* does not exist.
bash-5.2#
------------------------------
Subba Reddy Reddem
Original Message:
Sent: Mon May 20, 2024 10:28 AM
From: Ayappan P
Subject: Python module error in AIX 7.3
Okay, whether "/usr/bin/xlc_r" exist ?
------------------------------
Ayappan P
Original Message:
Sent: Mon May 20, 2024 10:26 AM
From: Subba Reddy Reddem
Subject: Python module error in AIX 7.3
Hi Ayyappan,
Please find the output.
bash-5.2# echo $PATH
/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java8_64/jre/bin:/usr/java8_64/bin:/opt/CA/SharedComponents/bin:/opt/CA/SharedComponents/ccs/cam/bin
bash-5.2#
------------------------------
Subba Reddy Reddem
Original Message:
Sent: Mon May 20, 2024 10:24 AM
From: Ayappan P
Subject: Python module error in AIX 7.3
What is the output of "echo $PATH" in your machine ?
------------------------------
Ayappan P
Original Message:
Sent: Mon May 20, 2024 10:14 AM
From: Subba Reddy Reddem
Subject: Python module error in AIX 7.3
Hi Stephen,
I have xlc_r available in my path.
bash-5.2# ls -ld xlc_r
lrwxrwxrwx 1 root system 3 May 20 17:38 xlc_r -> xlC
bash-5.2# pwd
/opt/IBM/xlC/13.1.3/bin
bash-5.2#
------------------------------
Subba Reddy Reddem
Original Message:
Sent: Mon May 20, 2024 10:08 AM
From: Stephen Ulmer
Subject: Python module error in AIX 7.3
Ahhh... but is the threaded one installed? xlc_r is the version of xlc that supports threads (I think _r is for reentrant).
Do you have xlc_r on the system, and is it also in your PATH?
--
Stephen L. Ulmer
Enterprise Architect
Mainline Information Systems
Original Message:
Sent: 5/20/2024 9:51:00 AM
From: Subba Reddy Reddem
Subject: RE: Python module error in AIX 7.3
Hi Stephen,
Thanks for your prompt reply.
I have compiler installed in the server.
# /usr/bin/xlc -qversion
IBM XL C/C++ for AIX, V13.1.3 (5725-C72, 5765-J07)
Version: 13.01.0003.0008
#
------------------------------
Subba Reddy Reddem
Original Message:
Sent: Mon May 20, 2024 09:18 AM
From: Stephen Ulmer
Subject: Python module error in AIX 7.3
The output you sent says that the build process can't find the compiler.
--
Stephen L. Ulmer
Enterprise Architect
Mainline Information Systems
This e-mail and files transmitted with it are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you are not one of the named recipient(s) or otherwise have reason to believe that you received this message in error, please immediately notify sender by e-mail, and destroy the original message.
Original Message:
Sent: 5/20/2024 8:50:00 AM
From: Subba Reddy Reddem
Subject: Python module error in AIX 7.3
Hi Team,
I am getting the following error when trying to install pyRXP module in the AIX 7.3 server.
python3.9 -m pip install -- pyRXP
Collecting pyRXP
Using cached pyRXP-3.0.1.tar.gz (301 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pyRXP
Building wheel for pyRXP (pyproject.toml) ... error
error: subprocess-exited-with-error
Building wheel for pyRXP (pyproject.toml) did not run successfully.
exit code: 1
[13 lines of output]
running bdist_wheel
running build
running build_ext
building 'pyRXPU' extension
creating build
creating build/temp.aix-7302-2345-64-cpython-39
creating build/temp.aix-7302-2345-64-cpython-39/tmp
creating build/temp.aix-7302-2345-64-cpython-39/tmp/pip-install-cl31j6au
creating build/temp.aix-7302-2345-64-cpython-39/tmp/pip-install-cl31j6au/pyrxp_29a71ca5826d49c7940f1dd56a7415ff
creating build/temp.aix-7302-2345-64-cpython-39/tmp/pip-install-cl31j6au/pyrxp_29a71ca5826d49c7940f1dd56a7415ff/src
creating build/temp.aix-7302-2345-64-cpython-39/tmp/pip-install-cl31j6au/pyrxp_29a71ca5826d49c7940f1dd56a7415ff/src/rxp
xlc_r -q64 -qPIC -DNDEBUG -O2 -qmaxmem=-1 -I/usr/opt/python3/include -I/usr/include -D_ALL_SOURCE -D_LINUX_SOURCE_COMPAT -qbitfields=signed -qalloca -O2 -qmaxmem=-1 -I/usr/opt/python3/include -I/usr/include -D_ALL_SOURCE -D_LINUX_SOURCE_COMPAT -qbitfields=signed -qalloca -O2 -qmaxmem=-1 -DCHAR_SIZE=16 -I/tmp/pip-install-cl31j6au/pyrxp_29a71ca5826d49c7940f1dd56a7415ff/src/rxp -I/usr/opt/python3/include/python3.9 -c /tmp/pip-install-cl31j6au/pyrxp_29a71ca5826d49c7940f1dd56a7415ff/src/pyRXP.c -o build/temp.aix-7302-2345-64-cpython-39/tmp/pip-install-cl31j6au/pyrxp_29a71ca5826d49c7940f1dd56a7415ff/src/pyRXP.o
error: command 'xlc_r' failed: No such file or directory
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyRXP
Failed to build pyRXP
ERROR: Could not build wheels for pyRXP, which is required to install pyproject.toml-based projects
Can you please provide the fix to this ASAP
------------------------------
Subba Reddy Reddem
------------------------------