LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-16-2024, 02:44 PM   #1
arfon
Member
 
Registered: Apr 2004
Distribution: Slackware & RHEL
Posts: 376

Rep: Reputation: Disabled
"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?

Last edited by arfon; 04-16-2024 at 02:46 PM.
 
Old 04-16-2024, 03:51 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,143

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
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.
 
Old 04-16-2024, 05:21 PM   #3
Pithium
Member
 
Registered: Jul 2014
Location: Far side of the Oregon Trail
Distribution: Slackware64 15.0
Posts: 502

Rep: Reputation: 585Reputation: 585Reputation: 585Reputation: 585Reputation: 585Reputation: 585
Were the dependencies installed before or after the update to python 3.11?
 
Old 04-16-2024, 08:24 PM   #4
arfon
Member
 
Registered: Apr 2004
Distribution: Slackware & RHEL
Posts: 376

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by smallpond View Post
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.

Last edited by arfon; 04-16-2024 at 10:54 PM.
 
Old 04-17-2024, 02:08 AM   #5
USUARIONUEVO
Senior Member
 
Registered: Apr 2015
Posts: 2,335

Rep: Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930Reputation: 930
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.
 
Old 04-18-2024, 06:40 AM   #6
arfon
Member
 
Registered: Apr 2004
Distribution: Slackware & RHEL
Posts: 376

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by USUARIONUEVO View Post
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?
 
Old 04-18-2024, 06:53 AM   #7
gegechris99
Senior Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 15.0 64bit
Posts: 1,161
Blog Entries: 5

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
Quote:
Originally Posted by arfon View Post

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.
 
Old 04-18-2024, 07:02 AM   #8
dhalliwe
Member
 
Registered: Mar 2022
Location: Ontario, Canada
Distribution: Slackware
Posts: 163

Rep: Reputation: 154Reputation: 154
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.)
 
Old 04-18-2024, 12:50 PM   #9
fourtysixandtwo
Member
 
Registered: Jun 2021
Location: Alberta
Distribution: Slackware...mostly
Posts: 317

Rep: Reputation: 209Reputation: 209Reputation: 209
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 View Post

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__)"
 
1 members found this post helpful.
Old 04-18-2024, 03:58 PM   #10
gegechris99
Senior Member
 
Registered: Oct 2005
Location: France
Distribution: Slackware 15.0 64bit
Posts: 1,161
Blog Entries: 5

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
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

Last edited by gegechris99; 04-18-2024 at 04:06 PM. Reason: corrected typo in package name : python-pathlib2
 
Old 04-18-2024, 09:06 PM   #11
fourtysixandtwo
Member
 
Registered: Jun 2021
Location: Alberta
Distribution: Slackware...mostly
Posts: 317

Rep: Reputation: 209Reputation: 209Reputation: 209
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
 
Old 04-19-2024, 03:51 AM   #12
Pithium
Member
 
Registered: Jul 2014
Location: Far side of the Oregon Trail
Distribution: Slackware64 15.0
Posts: 502

Rep: Reputation: 585Reputation: 585Reputation: 585Reputation: 585Reputation: 585Reputation: 585
Quote:
Originally Posted by arfon View Post
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......
 
Old 04-26-2024, 03:57 PM   #13
arfon
Member
 
Registered: Apr 2004
Distribution: Slackware & RHEL
Posts: 376

Original Poster
Rep: Reputation: Disabled
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)

Last edited by arfon; 04-26-2024 at 04:01 PM.
 
Old 04-26-2024, 10:30 PM   #14
arfon
Member
 
Registered: Apr 2004
Distribution: Slackware & RHEL
Posts: 376

Original Poster
Rep: Reputation: Disabled
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
package installed successfully but does not appear in KDE menu Greebstreebling Linux - Software 5 07-22-2011 05:09 PM
[SOLVED] Just successfully installed PCLinuxOS Phoenix Edition 2010 and have some questions tcd1971 Linux - Newbie 15 12-17-2010 04:24 AM
[SOLVED] Just successfully installed PCLinuxOS Phoenix Edition 2010 and have some questions tcd1971 Linux - Hardware 1 12-14-2010 07:39 PM
Help With Java Problem Please"""""""""""" suemcholan Linux - Newbie 1 04-02-2008 06:02 PM
What does "Directory "/usr/src/linux" doesn't appear to contain kernel source." mean? jtp51 Linux - General 4 06-11-2007 12:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration