[英]I can't install pyimgui library on fedora
I'm using fedora 36. I tried the install pyimgui python library like its github page.我正在使用 fedora 36。我尝试安装 pyimgui python 库,就像它的 github 页面一样。
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
Because pip would be just about the same on Linux and on Windows, have you tried a virtual environment?因为 pip 在 Linux 和 Windows 上几乎是一样的,你试过虚拟环境吗? Otherwise you might just be using a crappy package, or at the very least it doesn't work on Linux.
否则你可能只是在使用一个糟糕的 package,或者至少它在 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.对于 Linux,无论如何建议使用虚拟环境进行开发,因为冲突包可能会导致基础安装出现问题,这对您的 Linux 系统是不利的。
EDIT: Looking at the traceback in more detail, the problem seems to be gcc .编辑:更详细地查看回溯,问题似乎是gcc 。 Do you know if your current version is compatible with the package.
你知道你现在的版本是否兼容package.
ANOTHER EDIT: It seems to say things about C++, not just C. Maybe the problem is g++ , not gcc ?另一个编辑:它似乎在说 C++,而不仅仅是 C。也许问题是g++ ,而不是gcc ?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.