From 17dacc33652899fce8f5d96c6c2e7cc0d0783726 Mon Sep 17 00:00:00 2001 From: Abdirahim Musse <33973272+abmusse@users.noreply.github.com> Date: Thu, 13 Oct 2022 14:23:31 -0500 Subject: [PATCH 1/2] doc: Add gevent install info --- python/INSTALLING_PYTHON_PKGS.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/python/INSTALLING_PYTHON_PKGS.md b/python/INSTALLING_PYTHON_PKGS.md index c17bb87..0c8277b 100644 --- a/python/INSTALLING_PYTHON_PKGS.md +++ b/python/INSTALLING_PYTHON_PKGS.md @@ -26,3 +26,32 @@ You will also need to set the following environment variables for build: If you have issues that you cannot debug, feel free to join the community channels documented [here](http://ibm.biz/ibmioss)! + +### gevent + +When installing gevent, you may encounter a compile error such as: + +```c + c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory + #include + ^ + compilation terminated. + error: command '/QOpenSys/pkgs/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: legacy-install-failure + + × Encountered error while trying to install package. + ╰─> cffi +``` + +This occurs because gevent uses cffi as a build requirement. Build requirements are built in an isolated enironment +We package cffi as an RPM. To use the cffi package as rpm do the following: + +```bash +# install python39-cffi +yum install python39-cffi +# disable build isolation to use system cffi +pip3.9 install --no-build-isolation gevent +``` From 46c63c4f77f207f43c66f3e79cca507c1be9d825 Mon Sep 17 00:00:00 2001 From: Abdirahim Musse <33973272+abmusse@users.noreply.github.com> Date: Thu, 13 Oct 2022 14:27:13 -0500 Subject: [PATCH 2/2] fixup! doc: Add gevent install info --- python/INSTALLING_PYTHON_PKGS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/INSTALLING_PYTHON_PKGS.md b/python/INSTALLING_PYTHON_PKGS.md index 0c8277b..4723a92 100644 --- a/python/INSTALLING_PYTHON_PKGS.md +++ b/python/INSTALLING_PYTHON_PKGS.md @@ -46,8 +46,8 @@ When installing gevent, you may encounter a compile error such as: ╰─> cffi ``` -This occurs because gevent uses cffi as a build requirement. Build requirements are built in an isolated enironment -We package cffi as an RPM. To use the cffi package as rpm do the following: +This occurs because gevent uses cffi as a build requirement. Build requirements are built in an isolated environment. +We already package cffi as an RPM, do the following to use it: ```bash # install python39-cffi