I can't install pyimgui library on fedora

419 Views Asked by At

I'm using fedora 36. I tried the install pyimgui python library like its github page.

sudo pip install imgui[full]

But this error occured and I don't know what should I do?

[mehmed-irumi@fedora ~]$ sudo pip install imgui[full]
Collecting imgui[full]
  Using cached imgui-1.4.1.tar.gz (855 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting Cython<0.30,>=0.24
  Using cached Cython-0.29.32-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (1.9 MB)
Collecting cocos2d
  Downloading cocos2d-0.6.9.tar.gz (4.7 MB)
     |████████████████████████████████| 4.7 MB 2.6 MB/s            
  Preparing metadata (setup.py) ... done
Collecting pygame
  Downloading pygame-2.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (21.9 MB)
     |████████████████████████████████| 21.9 MB 4.0 MB/s            
Collecting pyglet
  Downloading pyglet-1.5.27-py3-none-any.whl (1.1 MB)
     |████████████████████████████████| 1.1 MB 3.0 MB/s            
Collecting PySDL2
  Downloading PySDL2-0.9.14.tar.gz (761 kB)
     |████████████████████████████████| 761 kB 519 kB/s            
  Preparing metadata (setup.py) ... done
Collecting glfw
  Using cached glfw-2.5.5-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38-none-manylinux2014_x86_64.whl (207 kB)
Collecting PyOpenGL
  Using cached PyOpenGL-3.1.6-py3-none-any.whl (2.4 MB)
Requirement already satisfied: six>=1.4 in /usr/lib/python3.10/site-packages (from cocos2d->imgui[full]) (1.16.0)
Using legacy 'setup.py install' for cocos2d, since package 'wheel' is not installed.
Using legacy 'setup.py install' for PySDL2, since package 'wheel' is not installed.
Building wheels for collected packages: imgui
  Building wheel for imgui (pyproject.toml) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmps2y8h5jz
       cwd: /tmp/pip-install-budlaqg2/imgui_ab804ce65070444b94002609ea8c56db
  Complete output (39 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.10
  creating build/lib.linux-x86_64-3.10/imgui
  copying imgui/extra.py -> build/lib.linux-x86_64-3.10/imgui
  copying imgui/_compat.py -> build/lib.linux-x86_64-3.10/imgui
  copying imgui/__init__.py -> build/lib.linux-x86_64-3.10/imgui
  creating build/lib.linux-x86_64-3.10/imgui/integrations
  copying imgui/integrations/sdl2.py -> build/lib.linux-x86_64-3.10/imgui/integrations
  copying imgui/integrations/pyglet.py -> build/lib.linux-x86_64-3.10/imgui/integrations
  copying imgui/integrations/pygame.py -> build/lib.linux-x86_64-3.10/imgui/integrations
  copying imgui/integrations/opengl.py -> build/lib.linux-x86_64-3.10/imgui/integrations
  copying imgui/integrations/glumpy.py -> build/lib.linux-x86_64-3.10/imgui/integrations
  copying imgui/integrations/glfw.py -> build/lib.linux-x86_64-3.10/imgui/integrations
  copying imgui/integrations/cocos2d.py -> build/lib.linux-x86_64-3.10/imgui/integrations
  copying imgui/integrations/base.py -> build/lib.linux-x86_64-3.10/imgui/integrations
  copying imgui/integrations/__init__.py -> build/lib.linux-x86_64-3.10/imgui/integrations
  running egg_info
  no previously-included directories found matching 'imgui-cpp/examples'
  no previously-included directories found matching 'imgui-cpp/extra_fonts'
  writing manifest file 'imgui.egg-info/SOURCES.txt'
  copying imgui/ansifeed.pxd -> build/lib.linux-x86_64-3.10/imgui
  copying imgui/cimgui.pxd -> build/lib.linux-x86_64-3.10/imgui
  copying imgui/core.cpp -> build/lib.linux-x86_64-3.10/imgui
  copying imgui/core.h -> build/lib.linux-x86_64-3.10/imgui
  copying imgui/core.pxd -> build/lib.linux-x86_64-3.10/imgui
  copying imgui/core.pyx -> build/lib.linux-x86_64-3.10/imgui
  copying imgui/enums.pxd -> build/lib.linux-x86_64-3.10/imgui
  running build_ext
  creating build/temp.linux-x86_64-3.10
  creating build/temp.linux-x86_64-3.10/config-cpp
  creating build/temp.linux-x86_64-3.10/imgui-cpp
  creating build/temp.linux-x86_64-3.10/imgui
  gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPYIMGUI_CUSTOM_EXCEPTION -Iimgui-cpp -Iansifeed-cpp -I./imgui -Iimgui -Iconfig-cpp -I/usr/include/python3.10 -c config-cpp/py_imconfig.cpp -o build/temp.linux-x86_64-3.10/config-cpp/py_imconfig.o -includeconfig-cpp/py_imconfig.h
  gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory
  compilation terminated.
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for imgui
Failed to build imgui
ERROR: Could not build wheels for imgui, which is required to install pyproject.toml-based projects
[mehmed-irumi@fedora ~]$ sudo pip3 install imgui[full]
Collecting imgui[full]
  Using cached imgui-1.4.1.tar.gz (855 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pyglet
  Using cached pyglet-1.5.27-py3-none-any.whl (1.1 MB)
Collecting pygame
  Using cached pygame-2.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (21.9 MB)
Collecting PySDL2
  Using cached PySDL2-0.9.14.tar.gz (761 kB)
  Preparing metadata (setup.py) ... done
Collecting cocos2d
  Using cached cocos2d-0.6.9.tar.gz (4.7 MB)
  Preparing metadata (setup.py) ... done
Collecting Cython<0.30,>=0.24
  Using cached Cython-0.29.32-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (1.9 MB)
Collecting PyOpenGL
  Using cached PyOpenGL-3.1.6-py3-none-any.whl (2.4 MB)
Collecting glfw
  Using cached glfw-2.5.5-py2.py27.py3.py30.py31.py32.py33.py34.py35.py36.py37.py38-none-manylinux2014_x86_64.whl (207 kB)
Requirement already satisfied: six>=1.4 in /usr/lib/python3.10/site-packages (from cocos2d->imgui[full]) (1.16.0)
Using legacy 'setup.py install' for cocos2d, since package 'wheel' is not installed.
Using legacy 'setup.py install' for PySDL2, since package 'wheel' is not installed.
Building wheels for collected packages: imgui
  Building wheel for imgui (pyproject.toml) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /usr/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /tmp/tmpetpxf412
       cwd: /tmp/pip-install-u5lufgjv/imgui_303b3356d2ca4eee89926439e8a62011
  Complete output (39 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.10
  creating build/lib.linux-x86_64-3.10/imgui
  copying imgui/extra.py -> build/lib.linux-x86_64-3.10/imgui
  copying imgui/_compat.py -> build/lib.linux-x86_64-3.10/imgui
  copying imgui/__init__.py -> build/lib.linux-x86_64-3.10/imgui
  creating build/lib.linux-x86_64-3.10/imgui/integrations
  copying imgui/integrations/sdl2.py -> build/lib.linux-x86_64-3.10/imgui/integrations
  copying imgui/integrations/pyglet.py -> build/lib.linux-x86_64-3.10/imgui/integrations
  copying imgui/integrations/pygame.py -> build/lib.linux-x86_64-3.10/imgui/integrations
  copying imgui/integrations/opengl.py -> build/lib.linux-x86_64-3.10/imgui/integrations
  copying imgui/integrations/glumpy.py -> build/lib.linux-x86_64-3.10/imgui/integrations
  copying imgui/integrations/glfw.py -> build/lib.linux-x86_64-3.10/imgui/integrations
  copying imgui/integrations/cocos2d.py -> build/lib.linux-x86_64-3.10/imgui/integrations
  copying imgui/integrations/base.py -> build/lib.linux-x86_64-3.10/imgui/integrations
  copying imgui/integrations/__init__.py -> build/lib.linux-x86_64-3.10/imgui/integrations
  running egg_info
  no previously-included directories found matching 'imgui-cpp/examples'
  no previously-included directories found matching 'imgui-cpp/extra_fonts'
  writing manifest file 'imgui.egg-info/SOURCES.txt'
  copying imgui/ansifeed.pxd -> build/lib.linux-x86_64-3.10/imgui
  copying imgui/cimgui.pxd -> build/lib.linux-x86_64-3.10/imgui
  copying imgui/core.cpp -> build/lib.linux-x86_64-3.10/imgui
  copying imgui/core.h -> build/lib.linux-x86_64-3.10/imgui
  copying imgui/core.pxd -> build/lib.linux-x86_64-3.10/imgui
  copying imgui/core.pyx -> build/lib.linux-x86_64-3.10/imgui
  copying imgui/enums.pxd -> build/lib.linux-x86_64-3.10/imgui
  running build_ext
  creating build/temp.linux-x86_64-3.10
  creating build/temp.linux-x86_64-3.10/config-cpp
  creating build/temp.linux-x86_64-3.10/imgui-cpp
  creating build/temp.linux-x86_64-3.10/imgui
  gcc -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPYIMGUI_CUSTOM_EXCEPTION -Iimgui-cpp -Iansifeed-cpp -I./imgui -Iimgui -Iconfig-cpp -I/usr/include/python3.10 -c config-cpp/py_imconfig.cpp -o build/temp.linux-x86_64-3.10/config-cpp/py_imconfig.o -includeconfig-cpp/py_imconfig.h
  gcc: fatal error: cannot execute ‘cc1plus’: execvp: No such file or directory
  compilation terminated.
  error: command '/usr/bin/gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for imgui
Failed to build imgui
ERROR: Could not build wheels for imgui, which is required to install pyproject.toml-based projects
1

There are 1 best solutions below

0
On

Because pip would be just about the same on Linux and on Windows, have you tried a virtual environment? Otherwise you might just be using a crappy package, or at the very least it doesn't work on Linux.

For Linux, it's recommended to use virtual environments for developing anyway, since conflicting packages might accrued problems with the base installation, which is detrimental to your Linux system.

EDIT: Looking at the traceback in more detail, the problem seems to be gcc. Do you know if your current version is compatible with the package.

ANOTHER EDIT: It seems to say things about C++, not just C. Maybe the problem is g++, not gcc?