Hi! For some reason, libxml2 can be imported from Python 3.9 and 3.10 but not from 3.11: # qlist dev-libs/libxml2 | grep /libxml2.py /usr/lib/python3.9/site-packages/libxml2.py /usr/lib/python3.10/site-packages/libxml2.py /usr/lib/python3.11/site-packages/libxml2.py # python3.9 -c 'import libxml2' ; echo $? 0 # python3.10 -c 'import libxml2' ; echo $? 0 # python3.11 -c 'import libxml2' ; echo $? Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'libxml2' 1 Same after re-install. Does it work for 3.11 for you? Any ideas? Thanks in advance! PS: What made me notice was gnome-extra/zenity install failing with ModuleNotFoundError.
Please include emerge -pvO dev-libs/libxml2. For me with [ebuild R ] dev-libs/libxml2-2.10.3-r1:2::gentoo USE="ftp icu python readline -debug -examples -lzma -static-libs -test" ABI_X86="32 (64) (-x32)" PYTHON_TARGETS="python3_9 python3_10 python3_11" 0 KiB I can import it: $ python3.11 -c 'import libxml2' ; echo $? 0 $ python3.10 -c 'import libxml2' ; echo $? 0 $ python3.9 -c 'import libxml2' ; echo $? 0 and $ python3.12 -c 'import libxml2' ; echo $? # expected failure for new impl Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'libxml2' 1
(In reply to Sebastian Pipping from comment #0) > > PS: What made me notice was gnome-extra/zenity install failing with > ModuleNotFoundError. Please be more specific (full output/build.log would be great). What was failing to import it? What during the zenity build needed libxml2?
(In reply to Sam James from comment #1) > Please include emerge -pvO dev-libs/libxml2. > > For me with > > [ebuild R ] dev-libs/libxml2-2.10.3-r1:2::gentoo USE="ftp icu python > readline -debug -examples -lzma -static-libs -test" ABI_X86="32 (64) (-x32)" > PYTHON_TARGETS="python3_9 python3_10 python3_11" 0 KiB That would be: # emerge -pvO dev-libs/libxml2 These are the packages that would be merged, in order: [ebuild R ] dev-libs/libxml2-2.10.3-r1:2::gentoo USE="ftp icu python readline static-libs -debug -examples -lzma -test" ABI_X86="32 (64) (-x32)" PYTHON_TARGETS="python3_9 python3_10 python3_11" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB For some reason "python3.11 -c 'import libxml2'" magically works without error now. All I did was change "eselect python ..." and that should have no effect. Can be closed as magically disappeared I guess? *shrug* > Please be more specific (full output/build.log would be great). What was > failing to import it? What during the zenity build needed libxml2? The build uses dev-util/itstool and that tries to import libxml2. Thanks for your quick reply!