LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   "wxPython/Phoenix does not appear to be installed on the system" (https://www.linuxquestions.org/questions/slackware-14/wxpython-phoenix-does-not-appear-to-be-installed-on-the-system-4175736100/)

arfon 04-16-2024 02:44 PM

"wxPython/Phoenix does not appear to be installed on the system"
 
Trying to [Slack]build KiCAD 8 (on -current) and I'm getting this failure:

CMake Error at cmake/FindwxPython.cmake:56 (message):
wxPython/Phoenix does not appear to be installed on the system


wxGTK3-3.0.5-x86_64-4_SBo,
wxPython3-3.0.2.0-x86_64-4_SB,
wxPython4-4.2.1-x86_64-1_SBo,
wxWidgets-3.2.4-x86_64-1_SBo
...are all installed.

Anyone have a fix for this?

smallpond 04-16-2024 03:51 PM

Try running the commands that cmake runs:

Code:

python
Python 3.12.2 (main, Feb  7 2024, 00:00:00) [GCC 13.2.1 20231205 (Red Hat 13.2.1-6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> print(wx.wxWidgets_version.split(' ')[1])
3.2.2.1

In your case it seems to be getting an error.

Pithium 04-16-2024 05:21 PM

Were the dependencies installed before or after the update to python 3.11?

arfon 04-16-2024 08:24 PM

Quote:

Originally Posted by smallpond (Post 6496431)
Try running the commands that cmake runs:

Code:

>>> import wx
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'wx'

wxWidgets is installed:

Code:

ls /var/log/packages/ | grep "wx"
wxGTK3-3.0.5-x86_64-4_SBo
wxPython3-3.0.2.0-x86_64-4_SBo
wxPython4-4.2.1-x86_64-1_SBo
wxWidgets-3.2.4-x86_64-1_SBo

So, I tried installing wxpython-4.2.0-x86_64-1alien and it doesn't work either. I still get no module named 'wx'

I removed ALL wxPython packages and reinstalled only AlienBOB's package and did a reboot with no effect.


Quote:

Were the dependencies installed before or after the update to python 3.11?
Every dependency that I can find listed has been BEFORE the update.

USUARIONUEVO 04-17-2024 02:08 AM

Two things

Python 3.12.2 ,

why ?

slackware provides python-3.11 not 3.12

And , second thing , if you have installed wxpython etc etc etc , okey ..but , probably installed when you have python 3.9 ?

You need to rebuild ALL , of the python things to sync with the version installed.

arfon 04-18-2024 06:40 AM

Quote:

Originally Posted by USUARIONUEVO (Post 6496530)
Python 3.12.2 ,why ? slackware provides python-3.11 not 3.12


That wasn't my box. My box the default Slackware package on it:

Code:

Python 3.11.9 (main, Apr  2 2024, 13:43:44) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.




Quote:

And , second thing , if you have installed wxpython etc etc etc , okey ..but , probably installed when you have python 3.9 ?

You need to rebuild ALL , of the python things to sync with the version installed.
I reinstalled all of it, no affect. I'm even running AlienBOB's wxPython package.

The REAL question is, why isn't python seeing the wxPython? How does it detect these things?

gegechris99 04-18-2024 06:53 AM

Quote:

Originally Posted by arfon (Post 6496820)

I reinstalled all of it, no affect. I'm even running AlienBOB's wxPython package.

The REAL question is, why isn't python seeing the wxPython? How does it detect these things?

When you say "reinstalled all of it", do you mean A) "rebuilt and reinstalled the packages" or B) "downloaded and reinstalled the packages"?

If you did B), it won't work because AlienBOB's wxPython package was built with Python 3.9 (just look inside the package file, there will be many files installed in python 3.9 directories)
As suggested by USUARIONUEVO, you have to rebuild the packages on your Slackware machine with Python 3.11 and then install those packages.

dhalliwe 04-18-2024 07:02 AM

I"m no python expert, but my impression is that:
  • Mixing installation of python modules by system commands or SlackBuild versus python's pip can lead to confusion.
  • When using pip as a normal user, modules will be built/installed within the user's space and only available to the user. (e.g. ~/.local/lib/python3.9/site-packages)
  • Using pip as root will install things in places where all users can access them. (e.g. /usr/lib64/python3.9/site-packages
  • ...but python modules get installed in directories that are specific to the version of python (2.7, 3.9, 3.11 etc) that pip is part of. (Slackware has pip, pip2, and pip3 in /usr/bin, to give some control over whether you are installing for python2 or python3.) As a result, installing modules for python 2.7 won't help python 3.x,and things installed for python 3.9 are ignored by python 3.11.

Trying to figure out where python has actually found a module has always been confusing to me. It has a defined search order, but there does not seem to be an easy method in code to determine the point at which the search succeeded. (Well, at least, easy for me.)

fourtysixandtwo 04-18-2024 12:50 PM

arfon, check for installed packages built for python3.9:

Code:

grep -l -m 1 python3.9 /var/log/packages/*|cut -d/ -f5|rev |cut -d- -f 4- |rev
Quote:

Originally Posted by dhalliwe (Post 6496829)

Trying to figure out where python has actually found a module has always been confusing to me. It has a defined search order, but there does not seem to be an easy method in code to determine the point at which the search succeeded. (Well, at least, easy for me.)

One method I use:

Code:

# python3 -c "import setuptools as i; print(i.__file__)"
/usr/lib/python3.11/site-packages/setuptools/__init__.py


## for wxPython4 and showing version
python3 -c "import wx as i; print(i.__file__,i.__version__)"


gegechris99 04-18-2024 03:58 PM

To make wxpython work in Slackware current, I built the following packages from source using AlienBOB slackbuild scripts (adapted to match newer versions and source file tar format in some cases instead of tar.gz).

- python-pathlib2 2.3.7.post1
- python-attrdict 2.02
- wxpython 4.2.1

Install the first two packages before building wxpython.

wxpython build will fail with :
Code:

:info:build Compiling wx/svg/_nanosvg.pyx because it changed.
:info:build [1/1] Cythonizing wx/svg/_nanosvg.pyx
:info:build Error compiling Cython file:
:info:build ------------------------------------------------------------
:info:build ...
:info:build for manipulating the SVG shape info in memory.
:info:build """
:info:build import sys
:info:build cimport cython.object
:info:build ^
:info:build ------------------------------------------------------------
:info:build wx/svg/_nanosvg.pyx:45:8: 'cython.object' is not a valid cython.* module

This is solved by patching source file wx/svg/_nanosvg.pyx by removing this line:

Code:

cimport cython.object
See https://github.com/wxWidgets/Phoenix/issues/2514
Patch: aeb557d

Note: I patched the above source file the quick and dirty way (I'm not so good at patching file). I'm sure someone can show the proper way to apply this patch in the wxpython Slackbuild

fourtysixandtwo 04-18-2024 09:06 PM

Everything builds fine here, this is the sbopkg log. kicad seems to run fine too.

Code:

SUMMARY LOG
Using the UNSUPPORTED SBo git repository for -current
Queue Process:  Download, build, and install

libgit2:
  MD5SUM check for libgit2-1.0.0.tar.gz ... OK
  Building package libgit2-1.0.0-x86_64-1_SBo.tgz ... OK
  Installing package libgit2-1.0.0-x86_64-1_SBo.tgz ... OK

wxWidgets:
  MD5SUM check for wxWidgets-3.2.4.tar.gz ... OK
  Building package wxWidgets-3.2.4-x86_64-1_SBo.tgz ... OK
  Installing package wxWidgets-3.2.4-x86_64-1_SBo.tgz ... OK

python3-attrdict:
  MD5SUM check for attrdict-2.0.1.tar.gz ... OK
  Building package python3-attrdict-2.0.1-x86_64-1_SBo.tgz ... OK
  Installing package python3-attrdict-2.0.1-x86_64-1_SBo.tgz ... OK

python3-pathlib2:
  MD5SUM check for pathlib2-2.3.6.tar.gz ... OK
  Building package python3-pathlib2-2.3.6-x86_64-1_SBo.tgz ... OK
  Installing package python3-pathlib2-2.3.6-x86_64-1_SBo.tgz ... OK

unifdef:
  MD5SUM check for unifdef-2.12.tar.xz ... OK
  Building package unifdef-2.12-x86_64-1_SBo.tgz ... OK
  Installing package unifdef-2.12-x86_64-1_SBo.tgz ... OK

xdg-dbus-proxy:
  MD5SUM check for xdg-dbus-proxy-0.1.4.tar.xz ... OK
  Building package xdg-dbus-proxy-0.1.4-x86_64-1_SBo.tgz ... OK
  Installing package xdg-dbus-proxy-0.1.4-x86_64-1_SBo.tgz ... OK

libwpe:
  MD5SUM check for libwpe-1.16.0.tar.xz ... OK
  Building package libwpe-1.16.0-x86_64-1_SBo.tgz ... OK
  Installing package libwpe-1.16.0-x86_64-1_SBo.tgz ... OK

wpebackend-fdo:
  MD5SUM check for wpebackend-fdo-1.14.2.tar.xz ... OK
  Building package wpebackend-fdo-1.14.2-x86_64-1_SBo.tgz ... OK
  Installing package wpebackend-fdo-1.14.2-x86_64-1_SBo.tgz ... OK

geoclue2:
  MD5SUM check for geoclue-2.6.0.tar.bz2 ... OK
  Building package geoclue2-2.6.0-x86_64-1_SBo.tgz ... OK
  Installing package geoclue2-2.6.0-x86_64-1_SBo.tgz ... OK

bubblewrap:
  MD5SUM check for bubblewrap-0.8.0.tar.xz ... OK
  Building package bubblewrap-0.8.0-x86_64-1_SBo.tgz ... OK
  Installing package bubblewrap-0.8.0-x86_64-1_SBo.tgz ... OK

webkit2gtk:
  MD5SUM check for webkitgtk-2.44.1.tar.xz ... OK
  Building package webkit2gtk-2.44.1-x86_64-1_SBo.tgz ... OK
  Installing package webkit2gtk-2.44.1-x86_64-1_SBo.tgz ... OK

wxPython4:
  MD5SUM check for wxPython-4.2.1.tar.gz ... OK
  Building package wxPython4-4.2.1-x86_64-2_SBo.tgz ... OK
  Installing package wxPython4-4.2.1-x86_64-2_SBo.tgz ... OK

unixODBC:
  MD5SUM check for unixODBC-2.3.12.tar.gz ... OK
  Building package unixODBC-2.3.12-x86_64-2_SBo.tgz ... OK
  Installing package unixODBC-2.3.12-x86_64-2_SBo.tgz ... OK

ngspice:
  MD5SUM check for ngspice-42.tar.gz ... OK
  MD5SUM check for ngspice-42-manual.pdf ... OK
  Building package ngspice-42-x86_64-1_SBo.tgz ... OK
  Installing package ngspice-42-x86_64-1_SBo.tgz ... OK

glm:
  MD5SUM check for glm-0.9.9.5.tar.gz ... OK
  Building package glm-0.9.9.5-x86_64-1_SBo.tgz ... OK
  Installing package glm-0.9.9.5-x86_64-1_SBo.tgz ... OK

VTK:
  MD5SUM check for VTK-9.3.0.tar.gz ... OK
  Building package VTK-9.3.0-x86_64-1_SBo.tgz ... OK
  Installing package VTK-9.3.0-x86_64-1_SBo.tgz ... OK

OpenCASCADE:
  MD5SUM check for opencascade-7.7.0.tgz ... OK
  Building package OpenCASCADE-7.7.0-x86_64-3_SBo.tgz ... OK
  Installing package OpenCASCADE-7.7.0-x86_64-3_SBo.tgz ... OK

kicad:
  MD5SUM check for kicad-8.0.tar.bz2 ... FAILED!
    Expected: 301a2f31b038a78cb75dd537275c0f9b
    Found:    072e1b591c8df3855086f19ff3d826b5
    Keeping the source and continuing.
  Building package kicad-8.0-x86_64-1_SBo.tgz ... OK
  Installing package kicad-8.0-x86_64-1_SBo.tgz ... OK


Pithium 04-19-2024 03:51 AM

Quote:

Originally Posted by arfon (Post 6496820)
That wasn't my box. My box the default Slackware package on it:

[code
The REAL question is, why isn't python seeing the wxPython? How does it detect these things?

To answer your question, the "python" program looks in /usr/lib64/python$PYTHON_VERSION/ folder for it's modules. This means that you can have multiple python versions installed alongside each other, each with their own set of modules. This is because python's minor version keeps changing, so a module written for 3.9 may not work with 3.11.

This means that Pat's upgrade to 3.11 broke the entire python universe on Slackware, forcing everyone to go through and re-run the SlackBuild scripts for every single module. Reinstalling isn't enough. A 3rd party repo like alienbob's is going to lag for some time until he gets a chance to update everything. As others here have mentioned the solution is to rebuild the packages you need yourself or wait for the repo you use to catch up.

Python is so much fun......

arfon 04-26-2024 03:57 PM

Latest error:

Code:

-- Found wxPython Phoenix 4.2.1/gtk3 (wxWidgets 3.2.2.1)
CMake Error at /usr/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
  wxWidgets_INCLUDE_DIRS) (Required is at least version "3.2.2.1")
Call Stack (most recent call first):
  /usr/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindwxWidgets.cmake:987 (find_package_handle_standard_args)
  CMakeLists.txt:1001 (find_package)

The part I don't understand:
Code:

  Could NOT find wxWidgets (missing: wxWidgets_LIBRARIES
  wxWidgets_INCLUDE_DIRS) (Required is at least version "3.2.2.1")


When it said (before that):
Code:

-- Found wxPython Phoenix 4.2.1/gtk3 (wxWidgets 3.2.2.1)

arfon 04-26-2024 10:30 PM

So after removing ALL of the python and wx packages and reinstalling them from -current/Alien/SBo. It still didn't work.

In the end, my issue was that I had AlienBOB's wxGTK3 3.2.1 package on the machine with the wxWidget 3.2.4 SBo package. It would 'see' the correct wxGTK3 version from the SBo but, it would try and load the wrong one from AlienBOB.

Got rid of the wxGTK3 3.2.1 package and now KiCAD builds.

What a PITA


All times are GMT -5. The time now is 08:49 AM.