OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Using pyenv python inplace of system default

  • Thread starter Thread starter Loma Harshana
  • Start date Start date
L

Loma Harshana

Guest
I am on archlinux and trying to run krita scripter (built-in python console) with a pyenv python version. The system default python version is 3.12, however the script I am running uses python libraries that require version 3.11.

Here is what I have tried so far.

  1. pyenv init, checked the version on console, it shows correct 3.11 (also tried setting pyenv global 3.11
  2. Install pyqt5 package with pip - this installs the packages in site-packages of pyenv 3.11 but I am not sure if it also builds the correct binaries required (the ones installed with the system package pacman -S python-pyqt5)
  3. export PYTHONHOME=$HOME/.pyenv/versions/3.11.9
  4. export PYTHONPATH=$HOME/.pyenv/versions/3.11.9/lib/python3.11:$PYTHONPAH
  5. export LD_LIBRARY_PATH=$HOME/.pyenv/versions/3.11.9/lib/python3.11/site-packages/PyQt5/Qt5/lib:$LD_LIBRARY_PATH

Now if I run krita from console I get error

krita: symbol lookup error: /usr/lib/libKF5WidgetsAddons.so.5: undefined symbol: _ZN11QToolButton13checkStateSetEv, version Qt_5

krita: symbol lookup error: /usr/lib/libKF5WidgetsAddons.so.5: undefined symbol: _ZN11QToolButton13checkStateSetEv, version Qt_5

Then I did :

ldd /usr/lib/libKF5WidgetsAddons.so.5 | grep Qt

This shows ~/.pyenv/versions/3.11.9/lib/python3.11/site-packages/PyQt5/Qt5/lib/libQt5Widgets.so.5 and other similar files.

so the so is found but looks like it's not compatible with libKF5WidgetsAddons.so (KDE qt5)?

How can I resolve this issue? Any other approach to simply replace default python with custom python in krita is also welcome. As a side note: I tried downloading the appimage of krita and it works fine with built-in 3.10 (this of course doesn't help, as I can't reinstall all the required libraries in this and repackage the appimage)
<p>I am on archlinux and trying to run krita scripter (built-in python console) with a pyenv python version. The system default python version is 3.12, however the script I am running uses python libraries that require version 3.11.</p>
<p>Here is what I have tried so far.</p>
<ol>
<li><code>pyenv init</code>, checked the version on console, it shows correct 3.11 (also tried setting <code>pyenv global 3.11</code></li>
<li>Install <code>pyqt5</code> package with <code>pip</code> - this installs the packages in site-packages of pyenv 3.11 but I am not sure if it also builds the correct binaries required (the ones installed with the system package <code>pacman -S python-pyqt5</code>)</li>
<li><code>export PYTHONHOME=$HOME/.pyenv/versions/3.11.9</code></li>
<li><code>export PYTHONPATH=$HOME/.pyenv/versions/3.11.9/lib/python3.11:$PYTHONPAH</code></li>
<li><code>export LD_LIBRARY_PATH=$HOME/.pyenv/versions/3.11.9/lib/python3.11/site-packages/PyQt5/Qt5/lib:$LD_LIBRARY_PATH</code></li>
</ol>
<p>Now if I run krita from console I get error</p>
<blockquote>
<p>krita: symbol lookup error: /usr/lib/libKF5WidgetsAddons.so.5: undefined symbol: _ZN11QToolButton13checkStateSetEv, version Qt_5</p>
</blockquote>
<p>krita: symbol lookup error: /usr/lib/libKF5WidgetsAddons.so.5: undefined symbol: _ZN11QToolButton13checkStateSetEv, version Qt_5</p>
<p>Then I did :</p>
<p><code>ldd /usr/lib/libKF5WidgetsAddons.so.5 | grep Qt</code></p>
<p>This shows <code>~/.pyenv/versions/3.11.9/lib/python3.11/site-packages/PyQt5/Qt5/lib/libQt5Widgets.so.5</code> and other similar files.</p>
<p>so the so is found but looks like it's not compatible with libKF5WidgetsAddons.so (KDE qt5)?</p>
<p>How can I resolve this issue? Any other approach to simply replace default python with custom python in krita is also welcome. As a side note: I tried downloading the appimage of krita and it works fine with built-in 3.10 (this of course doesn't help, as I can't reinstall all the required libraries in this and repackage the appimage)</p>
 

Latest posts

Top