hoffstadt / DearPyGui

Dear PyGui: A fast and powerful Graphical User Interface Toolkit for Python with minimal dependencies
https://dearpygui.readthedocs.io/en/latest/
MIT License
12.94k stars 676 forks source link

ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' #2222

Closed digbangbang closed 9 months ago

digbangbang commented 10 months ago

run import dearpygui._dearpygui ERROR my system ubuntu22.04

$ strings /lib/x8664-linux-gnu/libc.so.6 | grep GLIBC GLIBC_2.2.5 GLIBC_2.2.6 GLIBC_2.3 GLIBC_2.3.2 GLIBC_2.3.3 GLIBC_2.3.4 GLIBC_2.4 GLIBC_2.5 GLIBC_2.6 GLIBC_2.7 GLIBC_2.8 GLIBC_2.9 GLIBC_2.10 GLIBC_2.11 GLIBC_2.12 GLIBC_2.13 GLIBC_2.14 GLIBC_2.15 GLIBC_2.16 GLIBC_2.17 GLIBC_2.18 GLIBC_2.22 GLIBC_2.23 GLIBC_2.24 GLIBC_2.25 GLIBC_2.26 GLIBC_2.27 GLIBC_PRIVATE

so what method is the best to address the problem that my GLIBC version is lower than needed?

plssssss!!

v-ein commented 10 months ago

Option 1: Update your system.

https://stackoverflow.com/questions/45269102/working-with-lower-version-of-glibc-version-glibc-2-11-not-found-required-by

Option 2: Build DPG from sources

wiki: Building For Development

digbangbang commented 10 months ago

Thanks ! now some problems leave how does the option2 address the problem that my GLBIC version is too low?

v-ein commented 10 months ago

Never tried to build it on Linux.

AFAIK, DPG does not use any of the fancy bleeding-edge C++ stuff, so should build fine on pretty old C++ libs. Your glibc seems to be from 2018; I build DPG on Windows with Visual Studio 2017 and it builds just fine.

v-ein commented 10 months ago

Upd: didn't read the question correctly.

So as for "how": DPG is linked against a particular version of glibc, and can be used with the same or newer version without any problems: newer versions provide the same (or wider) set of functions as 2.29. Your glibc is a little bit old and might not have some of the functions that are present in 2.29. However, DPG doesn't use all the functions from glibc - it uses only a small subset. There's a high chance that DPG can be built with glibc 2.27.

By building DPG on your system, you'll get a version of DPG that is linked against your glibc, and can therefore run on that version. It's just a bad luck for you that the machine where developers build DPG has glibc 2.29.

v-ein commented 10 months ago

Hope it makes sense... if not, let me know.

digbangbang commented 10 months ago

Thanks! i'm trying to use option2 to address my problem,but when i operate this below, image something got wrong, cmake .. -- Build spdlog: 1.8.2 -- Build type: Release -- Using X11 for window creation CMake Error at Dependencies/glfw/CMakeLists.txt:221 (message): Xcursor headers not found; install libxcursor development package

-- Configuring incomplete, errors occurred!

and then i try to insall the libxcursor dependency using operation below apt-get install libxinerama-dev

Reading package lists... Done Building dependency tree
Reading state information... Done The following packages were automatically installed and are no longer required: cmake-data libarchive13 libcurl4 libjsoncpp1 liblzo2-2 librhash0 libuv1 Use 'apt autoremove' to remove them. The following additional packages will be installed: libxinerama1 x11proto-xinerama-dev The following NEW packages will be installed: libxinerama-dev libxinerama1 x11proto-xinerama-dev 0 upgraded, 3 newly installed, 0 to remove and 90 not upgraded. Need to get 18.9 kB of archives. After this operation, 139 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libxinerama1 amd64 2:1.1.3-1 [7908 B] Get:2 http://mirrors.aliyun.com/ubuntu bionic/main amd64 x11proto-xinerama-dev all 2018.4-4 [2628 B] Get:3 http://mirrors.aliyun.com/ubuntu bionic/main amd64 libxinerama-dev amd64 2:1.1.3-1 [8404 B] Fetched 18.9 kB in 0s (99.5 kB/s)
perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package libxinerama1:amd64. (Reading database ... 25024 files and directories currently installed.) Preparing to unpack .../libxinerama1_2%3a1.1.3-1_amd64.deb ... Unpacking libxinerama1:amd64 (2:1.1.3-1) ... Selecting previously unselected package x11proto-xinerama-dev. Preparing to unpack .../x11proto-xinerama-dev_2018.4-4_all.deb ... Unpacking x11proto-xinerama-dev (2018.4-4) ... Selecting previously unselected package libxinerama-dev:amd64. Preparing to unpack .../libxinerama-dev_2%3a1.1.3-1_amd64.deb ... Unpacking libxinerama-dev:amd64 (2:1.1.3-1) ... Setting up libxinerama1:amd64 (2:1.1.3-1) ... Setting up x11proto-xinerama-dev (2018.4-4) ... Setting up libxinerama-dev:amd64 (2:1.1.3-1) ... Processing triggers for libc-bin (2.27-3ubuntu1.5) ... /sbin/ldconfig.real: File /usr/lib/x86_64-linux-gnu/libcuda.so.470.129.06 is empty, not checked. /sbin/ldconfig.real: File /usr/lib/x86_64-linux-gnu/libnvidia-ptxjitcompiler.so.470.129.06 is empty, not checked. /sbin/ldconfig.real: File /usr/lib/x86_64-linux-gnu/libcuda.so.470.82.00 is empty, not checked. /sbin/ldconfig.real: File /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.470.82.00 is empty, not checked. /sbin/ldconfig.real: File /usr/lib/x86_64-linux-gnu/libnvidia-allocator.so.470.82.00 is empty, not checked. /sbin/ldconfig.real: File /usr/lib/x86_64-linux-gnu/libnvidia-compiler.so.470.82.00 is empty, not checked. /sbin/ldconfig.real: File /usr/lib/x86_64-linux-gnu/libnvidia-opencl.so.470.82.00 is empty, not checked. /sbin/ldconfig.real: File /usr/lib/x86_64-linux-gnu/libnvidia-cfg.so.470.82.00 is empty, not checked. /sbin/ldconfig.real: File /usr/lib/x86_64-linux-gnu/libnvidia-ptxjitcompiler.so.470.82.00 is empty, not checked.

it seems that the libxcursor dependency is installed successfully, but i cmake .. again, still error the same one cmake .. -- Build spdlog: 1.8.2 -- Build type: Release -- Using X11 for window creation CMake Error at Dependencies/glfw/CMakeLists.txt:221 (message): Xcursor headers not found; install libxcursor development package

-- Configuring incomplete, errors occurred!

is there something wrong i made?

v-ein commented 10 months ago

Just googled it, and the very first answer suggests that you install libxcursor-dev rather than (or in addition to) libxinerama-dev.

https://askubuntu.com/questions/620601/cant-install-libsdl2-dev-or-cmake-glfw-libxinerama-dev-problem

Please read the entire answer in that thread - I'm not a Linux kind of guy and might be missing something.

digbangbang commented 10 months ago

Hey bro, option2 I have just made it successfully cmake --build cmake-build-debug --config Debug [ 6%] Built target glfw [ 12%] Built target PureImgui [ 15%] Built target spdlog [ 58%] Built target coreemb [ 58%] Built target DearSandbox [ 60%] Built target boing [ 62%] Built target gears [ 63%] Built target heightmap [ 64%] Built target offscreen [ 66%] Built target particles [ 68%] Built target sharing [ 69%] Built target simple [ 70%] Built target splitview [ 71%] Built target wave [ 72%] Built target clipboard [ 73%] Built target events [ 75%] Built target msaa [ 78%] Built target glfwinfo [ 80%] Built target iconify [ 82%] Built target monitors [ 83%] Built target reopen [ 84%] Built target cursor [ 86%] Built target empty [ 87%] Built target gamma [ 88%] Built target icon [ 89%] Built target inputlag [ 90%] Built target joysticks [ 91%] Built target opacity [ 92%] Built target tearing [ 94%] Built target threads [ 95%] Built target timeout [ 96%] Built target title [ 98%] Built target triangle-vulkan [100%] Built target windows

but when using it python main.py --config configs/image.yaml input=data/anya_rgba.png save_path=save-dir Traceback (most recent call last): File "main.py", line 6, in import dearpygui.dearpygui as dpg File "/root/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/dearpygui/dearpygui.py", line 22, in import dearpygui._dearpygui as internal_dpg ImportError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /root/anaconda3/envs/dreamgaussian/lib/python3.8/site-packages/dearpygui/_dearpygui.so)

still the same problem, i wanna asking if there is something others that i need to complete after Build DPG from sources? because the problem seems not to be addressed. Thanks bro

v-ein commented 10 months ago

if there is something others that i need to complete after Build DPG from sources?

Yep. Set PYTHONPATH to the location of your freshly built _dearpygui.so (you might need to replicate the same directory structure as in site-packages, i.e. it should be some-path/dearpygui/_dearpygui.so, where PYTHONPATH points to the some-path directory). Right now Python is still picking up the version installed in Anaconda environment.

digbangbang commented 10 months ago

image Sry, bro bothering again. When I find the _dearpygui.so in my system, there is only one file in the anaconda environment, it's like that cmake didn't create a _dearpygui.so in my system. How come?

v-ein commented 10 months ago

Try to specify -DMVDIST_ONLY=True on the cmake command line.

Wang-Wenqing commented 9 months ago

run import dearpygui._dearpygui ERROR my system ubuntu22.04

$ strings /lib/x8664-linux-gnu/libc.so.6 | grep GLIBC GLIBC_2.2.5 GLIBC_2.2.6 GLIBC_2.3 GLIBC_2.3.2 GLIBC_2.3.3 GLIBC_2.3.4 GLIBC_2.4 GLIBC_2.5 GLIBC_2.6 GLIBC_2.7 GLIBC_2.8 GLIBC_2.9 GLIBC_2.10 GLIBC_2.11 GLIBC_2.12 GLIBC_2.13 GLIBC_2.14 GLIBC_2.15 GLIBC_2.16 GLIBC_2.17 GLIBC_2.18 GLIBC_2.22 GLIBC_2.23 GLIBC_2.24 GLIBC_2.25 GLIBC_2.26 GLIBC_2.27 GLIBC_PRIVATE

so what method is the best to address the problem that my GLIBC version is lower than needed?

plssssss!!

Can try to degrade the dearpygui version, for example: pip install dearpygui==1.7.1

digbangbang commented 9 months ago

Yes, it works. Thanks two guys. When i use the lower version dearpygui, it can be imported.