簡體   English   中英

我無法在 Fedora 上安裝 pyimgui 庫

[英]I can't install pyimgui library on fedora

我正在使用 fedora 36。我嘗試安裝 pyimgui python 庫,就像它的 github 頁面一樣。

sudo pip install imgui[full]

但是出現了這個錯誤,我不知道該怎么辦?

[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

因為 pip 在 Linux 和 Windows 上幾乎是一樣的,你試過虛擬環境嗎? 否則你可能只是在使用一個糟糕的 package,或者至少它在 Linux 上不起作用。

對於 Linux,無論如何建議使用虛擬環境進行開發,因為沖突包可能會導致基礎安裝出現問題,這對您的 Linux 系統是不利的。

編輯:更詳細地查看回溯,問題似乎是gcc 你知道你現在的版本是否兼容package.

另一個編輯:它似乎在說 C++,而不僅僅是 C。也許問題是g++ ,而不是gcc

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM