Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] dev-qt/qtwebengine Installed, yet fails
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 488
Location: Salem, OR

PostPosted: Tue Apr 23, 2024 11:13 pm    Post subject: [SOLVED] dev-qt/qtwebengine Installed, yet fails Reply with quote

[Edit: topic was titled "dev-qt/qtwebengine Installed, But "import" fails", but to add "[SOLVED]" required the title be shortened to meet the character limitation.]
I installed dev-qt/qtwebengine:

Code:
eos /home/jlpoole/test # eix dev-qt/qtwebengine
[I] dev-qt/qtwebengine
     Available versions: 
     (5)    5.15.13_p20240322(5/5.15)^t
     (6)    6.6.2(6/6.6.2)^t 6.6.3(6/6.6.3)^t 6.7.0(6/6.7.0)^t **6.7.9999(6/6.7.9999)*l^t **6.9999(6/6.9999)*l^t
       {accessibility (+)alsa bindist custom-cflags debug designer geolocation +jumbo-build kerberos opengl pdfium pulseaudio qml screencast +system-icu test vaapi vulkan webdriver (+)widgets}
     Installed versions:  6.7.0(6/6.7.0)^t(15:22:53 04/23/24)(alsa jumbo-build opengl pulseaudio system-icu vulkan widgets -accessibility -bindist -custom-cflags -designer -geolocation -kerberos -pdfium -qml -screencast -test -vaapi -webdriver)
     Homepage:            https://www.qt.io/
     Description:         Library for rendering dynamic web content in Qt6 C++ and QML applications

eos /home/jlpoole/test # equery uses dev-qt/qtwebengine
[ Legend : U - final flag setting for installation]
[        : I - package is installed with flag     ]
[ Colors : set, unset                             ]
 * Found these USE flags for dev-qt/qtwebengine-6.7.0:
 U I
 - - accessibility : Add support for accessibility (eg 'at-spi' library)
 + + alsa          : Add support for media-libs/alsa-lib (Advanced Linux Sound Architecture)
 - - bindist       : Flag to enable or disable options for prebuilt (GRP) packages (eg. due to licensing issues)
 - - custom-cflags : Build with user-specified CFLAGS (unsupported)
 - - designer      : Install the QWebEngineView plugin used to add widgets in dev-qt/designer forms that display web pages.
 - - geolocation   : Enable physical position determination
 + + jumbo-build   : Combine source files to speed up build process.
 - - kerberos      : Add kerberos support
 + + opengl        : Add support for OpenGL (3D graphics)
 - - pdfium        : Build the QtPdf module based on chromium's PDFium library
 + + pulseaudio    : Add sound server support via media-libs/libpulse (may be PulseAudio or PipeWire)
 - - qml           : Build QML/QtQuick bindings and imports
 - - screencast    : Enable support for remote desktop and screen cast using PipeWire
 + + system-icu    : Use the system-wide dev-libs/icu instead of bundled.
 - - test          : Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)
 - - vaapi         : Enable Video Acceleration API for hardware decoding
 + + vulkan        : Add support for 3D graphics and computing via the Vulkan cross-platform API
 - - webdriver     : Build tool for automated testing (ChromeDriver equivalent)
 + + widgets       : Enable QtWidgets support
eos /home/jlpoole/test #


Here are the messages at the end of the install:

Code:
>> Completed (4 of 4) dev-qt/qtwebengine-6.7.0::gentoo

 * Messages for package dev-qt/qtwebengine-6.7.0:

 * Package:    dev-qt/qtwebengine-6.7.0:6/6.7.0
 * Repository: gentoo
 * Maintainer: qt@gentoo.org
 * Upstream:   https://bugreports.qt.io/
 * USE:        abi_x86_64 alsa amd64 elibc_glibc jumbo-build kernel_linux opengl pulseaudio system-icu vulkan widgets
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Checking for at least 30 GiB RAM ...
 * Checking for at least 8 GiB disk space at "/var/tmp/portage/dev-qt/qtwebengine-6.7.0/temp" ...
 * Checking for at least 360 MiB disk space at "/usr" ...

 * Messages for package dev-qt/qtwebchannel-6.7.0:

 * Package:    dev-qt/qtwebchannel-6.7.0:6/6.7.0
 * Repository: gentoo
 * Maintainer: qt@gentoo.org
 * Upstream:   https://bugreports.qt.io/
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-qt/qtwebchannel-6.7.0/work/qtwebchannel-everywhere-src-6.7.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-qt/qtwebchannel-6.7.0/work/qtwebchannel-everywhere-src-6.7.0_build"
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-qt/qtwebchannel-6.7.0/work/qtwebchannel-everywhere-src-6.7.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-qt/qtwebchannel-6.7.0/work/qtwebchannel-everywhere-src-6.7.0_build"
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-qt/qtwebchannel-6.7.0/work/qtwebchannel-everywhere-src-6.7.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-qt/qtwebchannel-6.7.0/work/qtwebchannel-everywhere-src-6.7.0_build"
 * Skipping make test/check due to ebuild restriction.
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-qt/qtwebchannel-6.7.0/work/qtwebchannel-everywhere-src-6.7.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-qt/qtwebchannel-6.7.0/work/qtwebchannel-everywhere-src-6.7.0_build"
 * Final size of build directory: 4924 KiB (4.8 MiB)
 * Final size of installed tree:   560 KiB

 * Messages for package dev-qt/qtshadertools-6.7.0:

 * Package:    dev-qt/qtshadertools-6.7.0:6/6.7.0
 * Repository: gentoo
 * Maintainer: qt@gentoo.org
 * Upstream:   https://bugreports.qt.io/
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-qt/qtshadertools-6.7.0/work/qtshadertools-everywhere-src-6.7.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-qt/qtshadertools-6.7.0/work/qtshadertools-everywhere-src-6.7.0_build"
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-qt/qtshadertools-6.7.0/work/qtshadertools-everywhere-src-6.7.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-qt/qtshadertools-6.7.0/work/qtshadertools-everywhere-src-6.7.0_build"
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-qt/qtshadertools-6.7.0/work/qtshadertools-everywhere-src-6.7.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-qt/qtshadertools-6.7.0/work/qtshadertools-everywhere-src-6.7.0_build"
 * Skipping make test/check due to ebuild restriction.
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-qt/qtshadertools-6.7.0/work/qtshadertools-everywhere-src-6.7.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-qt/qtshadertools-6.7.0/work/qtshadertools-everywhere-src-6.7.0_build"
 * Final size of build directory: 44976 KiB (43.9 MiB)
 * Final size of installed tree:   6252 KiB ( 6.1 MiB)

 * Messages for package dev-qt/qtdeclarative-6.7.0:

 * Package:    dev-qt/qtdeclarative-6.7.0:6/6.7.0
 * Repository: gentoo
 * Maintainer: qt@gentoo.org
 * Upstream:   https://bugreports.qt.io/
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux network opengl sql ssl svg vulkan widgets
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Checking whether python3_12 is suitable ...
 *   dev-lang/python:3.12 ...
 * Using python3.12 to build (via PYTHON_COMPAT iteration)
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-qt/qtdeclarative-6.7.0/work/qtdeclarative-everywhere-src-6.7.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-qt/qtdeclarative-6.7.0/work/qtdeclarative-everywhere-src-6.7.0_build"
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-qt/qtdeclarative-6.7.0/work/qtdeclarative-everywhere-src-6.7.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-qt/qtdeclarative-6.7.0/work/qtdeclarative-everywhere-src-6.7.0_build"
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-qt/qtdeclarative-6.7.0/work/qtdeclarative-everywhere-src-6.7.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-qt/qtdeclarative-6.7.0/work/qtdeclarative-everywhere-src-6.7.0_build"
 * Skipping make test/check due to ebuild restriction.
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-qt/qtdeclarative-6.7.0/work/qtdeclarative-everywhere-src-6.7.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-qt/qtdeclarative-6.7.0/work/qtdeclarative-everywhere-src-6.7.0_build"
 * Final size of build directory: 638136 KiB (623.1 MiB)
 * Final size of installed tree:  104768 KiB (102.3 MiB)

 * Messages for package dev-qt/qtwebengine-6.7.0:

 * Package:    dev-qt/qtwebengine-6.7.0:6/6.7.0
 * Repository: gentoo
 * Maintainer: qt@gentoo.org
 * Upstream:   https://bugreports.qt.io/
 * USE:        abi_x86_64 alsa amd64 elibc_glibc jumbo-build kernel_linux opengl pulseaudio system-icu vulkan widgets
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Checking for at least 30 GiB RAM ...
 * Checking for at least 8 GiB disk space at "/var/tmp/portage/dev-qt/qtwebengine-6.7.0/temp" ...
 * Checking for at least 360 MiB disk space at "/usr" ...
 * Checking whether python3_12 is suitable ...
 *   dev-lang/python:3.12[xml(+)] ...
 *   python_check_deps ...
 *     dev-python/html5lib[python_targets_python3_12(-)] ...
 * Checking whether python3_11 is suitable ...
 *   dev-lang/python:3.11[xml(+)] ...
 *   python_check_deps ...
 *     dev-python/html5lib[python_targets_python3_11(-)] ...
 * Using python3.11 to build (via PYTHON_COMPAT iteration)
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-qt/qtwebengine-6.7.0/work/qtwebengine-everywhere-src-6.7.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-qt/qtwebengine-6.7.0/work/qtwebengine-everywhere-src-6.7.0_build"
 * Applying patches from /var/tmp/portage/dev-qt/qtwebengine-6.7.0/work/patches/qtwebengine ...
 *   01-toolchain.patch ...
 *   02-gentoo-extra-gn.patch ...
 *   03-gn-bootstrap.patch ...
 *   04-musl-allow-non-glibc.patch ...
 * Applying patches from /var/tmp/portage/dev-qt/qtwebengine-6.7.0/work/patches/chromium ...
 *   01-flags.patch ...
 *   02-default-fortify-level.patch ...
 *   03-musl-lfs64-gn.patch ...
 *   04-musl-no-cdefs.patch ...
 *   05-musl-no-execinfo.patch ...
 *   06-musl-no-mallinfo.patch ...
 *   07-musl-no-res-ninit.patch ...
 *   08-musl-sandbox.patch ...
 *   09-cstdint.patch ...
 *   10-glx-headers.patch ...
 * Applying qtwebengine-6.7.0-clang18.patch ...
 * Applying qtwebengine-6.7.0-ninja1.12.patch ...
 * Applying qtwebengine-6.7.0-displaykey-header.patch ...
 * Hardcoded definition(s) removed in src/3rdparty/chromium/third_party/swiftshader/CMakeLists.txt:
 *      set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The type of build: Debug Rel
 * Hardcoded definition(s) removed in src/3rdparty/chromium/third_party/boringssl/src/CMakeLists.txt:
 *    set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR}/install CACHE PATH "" FORCE)
 * Hardcoded definition(s) removed in src/3rdparty/chromium/third_party/dawn/CMakeLists.txt:
 *    set(CMAKE_BUILD_TYPE "Debug")
 * Hardcoded definition(s) removed in src/3rdparty/chromium/third_party/dawn/third_party/dxc/CMakeLists.txt:
 *    set(CMAKE_BUILD_TYPE "Debug")
 * Hardcoded definition(s) removed in src/3rdparty/chromium/third_party/libc++/src/CMakeLists.txt:
 *    set(CMAKE_BUILD_TYPE "COVERAGE" CACHE STRING "" FORCE)
 * Hardcoded definition(s) removed in src/3rdparty/chromium/third_party/angle/third_party/rapidjson/src/CMakeLists.txt:
 *      set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of bu
 * Hardcoded definition(s) removed in src/3rdparty/chromium/third_party/zstd/src/build/cmake/CMakeLists.txt:
 *    set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE
 * Hardcoded definition(s) removed in src/3rdparty/chromium/third_party/highway/src/CMakeLists.txt:
 *    set(CMAKE_BUILD_TYPE RelWithDebInfo)
 * Hardcoded definition(s) removed in src/3rdparty/chromium/third_party/nearby/src/fastpair/rust/demo/windows/CMakeLists.txt:
 *    set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE)
 * Hardcoded definition(s) removed in src/3rdparty/chromium/third_party/libgav1/src/CMakeLists.txt:
 *    set(CMAKE_BUILD_TYPE Release)
 * Hardcoded definition(s) removed in src/3rdparty/chromium/third_party/smhasher/src/CMakeLists.txt:
 *  set(CMAKE_BUILD_TYPE Release)
 * Hardcoded definition(s) removed in src/3rdparty/chromium/third_party/expat/src/expat/CMakeLists.txt:
 *      set(CMAKE_BUILD_TYPE NoConfig)  # so that accessing EXPAT_*_POSTFIX will
 * Hardcoded definition(s) removed in src/3rdparty/chromium/third_party/eigen3/src/CMakeLists.txt:
 *    set(CMAKE_BUILD_TYPE "Release")
 * Hardcoded definition(s) removed in src/3rdparty/chromium/third_party/vulkan-deps/glslang/src/CMakeLists.txt:
 *      set(CMAKE_BUILD_TYPE "Debug")
 * Hardcoded definition(s) removed in src/3rdparty/chromium/third_party/vulkan-deps/spirv-tools/src/CMakeLists.txt:
 *    set(CMAKE_BUILD_TYPE "Debug")
 * Hardcoded definition(s) removed in src/3rdparty/chromium/third_party/vulkan-deps/spirv-headers/src/tools/buildHeaders/CMakeLists.txt:
 *  set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "prefix" FORCE)
 * Hardcoded definition(s) removed in src/3rdparty/chromium/tools/clang/stack_maps/gc/CMakeLists.txt:
 *  SET(CMAKE_BUILD_TYPE Debug)
 * Extra Gn args: link_pulseaudio=true rtc_link_pipewire=true
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-qt/qtwebengine-6.7.0/work/qtwebengine-everywhere-src-6.7.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-qt/qtwebengine-6.7.0/work/qtwebengine-everywhere-src-6.7.0_build"
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-qt/qtwebengine-6.7.0/work/qtwebengine-everywhere-src-6.7.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-qt/qtwebengine-6.7.0/work/qtwebengine-everywhere-src-6.7.0_build"
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-qt/qtwebengine-6.7.0/work/qtwebengine-everywhere-src-6.7.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-qt/qtwebengine-6.7.0/work/qtwebengine-everywhere-src-6.7.0_build"
 * Skipping make test/check due to ebuild restriction.
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/dev-qt/qtwebengine-6.7.0/work/qtwebengine-everywhere-src-6.7.0"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/dev-qt/qtwebengine-6.7.0/work/qtwebengine-everywhere-src-6.7.0_build"
 * Final size of build directory: 7209604 KiB (  6.8 GiB)
 * Final size of installed tree:   342264 KiB (334.2 MiB)
 * Install additional packages for optional runtime features:
 *   www-plugins/chrome-binary-plugins for Widevine DRM support (protected media playback)
 *
 * This version of Qt WebEngine is based on Chromium version 118.0.5993.220, with
 * additional security fixes up to 122.0.6261.128. Extensive as it is, the
 * list of backports is impossible to evaluate, but always bound to be behind
 * Chromium's release schedule.
 *
 * In addition, various online services may deny service based on an outdated
 * user agent version (and/or other checks). Google is already known to do so.
 *
 * tl;dr your web browsing experience will be compromised.
 * QA Notice: Package triggers severe warnings which indicate that it
 *            may exhibit random runtime failures.
 * ../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/third_party/angle/src/libANGLE/renderer/vulkan/SurfaceVk.cpp:3069:35: warning: ‘this’ pointer is null [-Wnonnull]
 * ../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/third_party/crashpad/crashpad/client/crashpad_client_linux.cc:536:31: warning: passing argument 2 to ‘restrict’-qualified parameter aliases with argument 1 [-Wrestrict]
 * ../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/third_party/pdfium/core/fxcrt/retain_ptr.h:165:11: warning: ‘void operator delete(void*, std::size_t)’ called on pointer ‘<unknown>’ with nonzero offset 24 [-Wfree-nonheap-object]
 * ../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/third_party/pdfium/core/fxcrt/retain_ptr.h:165:11: warning: ‘void operator delete(void*, std::size_t)’ called on pointer ‘<unknown>’ with nonzero offset 56 [-Wfree-nonheap-object]
 * ../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/third_party/pdfium/core/fxcrt/retain_ptr.h:165:11: warning: ‘void operator delete(void*, std::size_t)’ called on pointer ‘<unknown>’ with nonzero offset 24 [-Wfree-nonheap-object]
 * ../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/third_party/pdfium/core/fxcrt/retain_ptr.h:165:11: warning: ‘void operator delete(void*, std::size_t)’ called on pointer ‘<unknown>’ with nonzero offset 56 [-Wfree-nonheap-object]
 * /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/new_allocator.h:172:33: warning: ‘void operator delete(void*, std::size_t)’ called on pointer ‘<unknown>’ with nonzero offset [1, 9223372036854775807] [-Wfree-nonheap-object]
 * ../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/third_party/crashpad/crashpad/client/annotation.h:316:12: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ specified bound 16 equals destination size [-Wstringop-truncation]
 * ../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/net/base/address_tracker_linux.cc:153:12: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ output may be truncated copying 15 bytes from a string of length 15 [-Wstringop-truncation]
 * ../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/traced_proto.h:316:23: warning: ‘this’ pointer is null [-Wnonnull]
 * ../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/third_party/crashpad/crashpad/client/annotation.h:316:12: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ specified bound 64 equals destination size [-Wstringop-truncation]
 * ../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/third_party/crashpad/crashpad/client/annotation.h:316:12: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ specified bound 128 equals destination size [-Wstringop-truncation]
 * /usr/lib/gcc/x86_64-pc-linux-gnu/13/include/g++-v13/bits/new_allocator.h:172:33: warning: ‘void operator delete(void*, std::size_t)’ called on pointer ‘<unknown>’ with nonzero offset [1, 9223372036854775807] [-Wfree-nonheap-object]
 * ../../../../../qtwebengine-everywhere-src-6.7.0/src/3rdparty/chromium/third_party/crashpad/crashpad/client/annotation.h:316:12: warning: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ specified bound 64 equals destination size [-Wstringop-truncation]
 * Please do not file a Gentoo bug and instead report the above QA
 * issues directly to the upstream developers of this software.
 * Homepage: https://www.qt.io/

 * GNU info directory index is up-to-date.

 * IMPORTANT: 4 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


real    218m46.953s
user    1788m32.832s
sys     146m46.187s
eos /home/jlpoole/test #


I have a script, test4webkit.py, which tests whether certain components can be found:
Code:

# https://stackoverflow.com/questions/48848061/python-pyqt5-cannot-import-name-qwebview

#    WebEngine:

#    from PyQt5.QtWebEngineWidgets import QWebEnginePage
#    from PyQt5.QtWebEngineWidgets import QWebEngineView

try:
  from PyQt5.QtWebEngineWidgets import QWebEnginePage
  print("PyQt5.QWebEnginePage is installed and available.")
except ModuleNotFoundError:
  print("***  PyQt5.QwebEnginePage is NOT installed.")
except Exception as e:
    print(f"An unspecified Exception occurred for QWebEnginePage test: {e}")
   
try:
  from PyQt5.QtWebEngineWidgets import QWebEngineView
  print("PyQt5.QWebEngineView is installed and available.")
except ModuleNotFoundError:
  print("***  PyQt5.QWebEngineView is NOT installed.")
except Exception as e:
    print(f"An unspecified Exception occurred for QWebEngineView test: {e}")
   

#    WebKit:

#    from PyQt5.QtWebKitWidgets import QWebPage
#    from PyQt5.QtWebKitWidgets import QWebView


try:
  from PyQt5.QtWebWidgets import QWebPage
  print("PyQt5.Qwebpage is installed and available")
except ModuleNotFoundError:
  print("***  PyQt5.Qwebpage is NOT installed.")
except Exception as e:
    print(f"An unspecified Exception occurred for QWebPage test: {e}")
 

try:
  from PyQt5.QtWebWidgets import QWebView
  print("PyQt5.QwebView is installed and available")
except ModuleNotFoundError:
  print("***  PyQt5.QwebView is NOT installed.")
except Exception as e:
    print(f"An unspecified Exception occurred for QWebView test: {e}")
 


The script is unable to find the package, or a part thereof on my Gentoo system. The script works on my Debian server.

Code:
eos /home/jlpoole/test # date;python3 test4webkit.py
Tue Apr 23 16:00:13 PDT 2024
***  PyQt5.QwebEnginePage is NOT installed.
***  PyQt5.QWebEngineView is NOT installed.
***  PyQt5.Qwebpage is NOT installed.
***  PyQt5.QwebView is NOT installed.
eos /home/jlpoole/test #
eos /home/jlpoole/test # python -V
Python 3.11.8
eos /home/jlpoole/test #
eos /home/jlpoole/test # date; eselect python list
Tue Apr 23 16:09:35 PDT 2024
Available Python interpreters, in order of preference:
  [1]   python3.11
  [2]   python3.12
  [3]   python3.10 (fallback)
eos /home/jlpoole/test #



I must be confusing something or missing somethin? Can someone advise on what I have done incorrectly?

I'm trying to troubleshoot the Qgis (sci-geosciences/qgis) plugin Qgis2threejs where the 3D viewer for this qgis plugin's Exporter dialog is erratic and reporting problems possibly due to not finding components of QtWebEngineWidgets.


Last edited by jlpoole on Wed Apr 24, 2024 2:11 pm; edited 3 times in total
Back to top
View user's profile Send private message
asturm
Developer
Developer


Joined: 05 Apr 2007
Posts: 9270

PostPosted: Wed Apr 24, 2024 4:15 am    Post subject: Reply with quote

For python modules you need PyQtWebEngine.
Back to top
View user's profile Send private message
jlpoole
Guru
Guru


Joined: 01 Nov 2005
Posts: 488
Location: Salem, OR

PostPosted: Wed Apr 24, 2024 2:10 pm    Post subject: Reply with quote

asturm wrote:
For python modules you need PyQtWebEngine.


That worked. Thank you, @asturm.

Code:
eos /home/jlpoole/test # date; python3 test4webkit.py
Wed Apr 24 07:03:31 PDT 2024
PyQt5.QWebEnginePage is installed and available.
PyQt5.QWebEngineView is installed and available.
***  PyQt5.Qwebpage is NOT installed.
***  PyQt5.QwebView is NOT installed.
eos /home/jlpoole/test #



Warning: dev-qt/qtwebengine is a dependency and it takes about 3-1/2 hours on a System 76 "Pangolin" laptop having AMD Ryzen™ 7 7840U: 3.3 up to 5.10 GHz - 8 Cores - 16 Threads and 32 GB memory.

Google Gemini advised that although qtwebengine may be installed, the bindings for Python may not be. It looks like PyQtWebEngine provides the bindings for Python. I had previously installed qtwebengine, and after asturm's suggestions, there were different flags required when installing PyQtWebEngine, so qtwebengine had to go through another multiple hour build. Other topics in the forum document the fact that dev-qt/qtwebengine takes a very long time to build.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum