I’m trying to install the InteractiveHtmlBom python module, so I first try :
python3 -m pip install InteractiveHtmlBom
And get the message about an extrernally managed environment, with the suggestion to use pipx.
So now I try : pipx install InteractiveHtmlBom
This sits there chugugging for a while and finally comes back with a bunch of errors
Fatal error from pip prevented installation. Full pip output in file:
path to file/cmd_2023-12-18_23.11.15_pip_errors.log
pip failed to build package:
wxpython
Some possibly relevant errors from pip install:
python-config : not found
Checking for library python3.11 in LIBDIR : not found
Checking for library python3.11 in python_LIBPL : not found
Checking for library python3.11 in $prefix/libs : not found
Checking for library python3.11 in $INCLUDEPY/../libs : not found
Checking for library python3.11m in LIBDIR : not found
Checking for library python3.11m in python_LIBPL : not found
Checking for library python3.11m in $prefix/libs : not found
Checking for library python3.11m in $INCLUDEPY/../libs : not found
Checking for library python311 in LIBDIR : not found
Checking for library python311 in python_LIBPL : not found
Checking for library python311 in $prefix/libs : not found
Checking for library python311 in $INCLUDEPY/../libs : not found
Error installing interactivehtmlbom.
I tried looking in yast for python-config but it doesn’t seem to be there?
@phillhs pip can be fraught with issues… It’s built as an rpm if you want to download (Requires openSUSE Build Service login as I don’t publish packages)…
You most likely need development environment to compile binary extensions during installation. OTOH the python-wxPython is already provided by Tumbleweed. Did you check prerequisites for your module?
rpm -Uvh ~afra/Downloads/python311-InteractiveHtmlBom-2.8.1-1.1.noarch.rpm
warning: /net/aurigae/home/afra/Downloads/python311-InteractiveHtmlBom-2.8.1-1.1.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 479de3c9: NOKEY
error: Failed dependencies:
python311-wxpython is needed by python311-InteractiveHtmlBom-2.8.1-1.1.noarch
Checked in YaST and python311-wxPython is installed though note the ‘P’ is capitalized, in wxPython.
zypper search python311-wxpython
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
--+--------------------+--------------------------------------------+-----------
i | python311-wxPython | The "Phoenix" variant of the wxWidgets P-> | package
| python311-wxPython | The "Phoenix" variant of the wxWidgets P-> | srcpackage
Hi, tried the same command in my system and got the same error. The log file complains about missing gtk3 development files. So:
I run sudo zypper in -C 'pkgconfig(gtk+-3.0)' and now the error becomes about missing Python 3.11 development files
I run sudo zypper in python311-devel and now the compilation fails due to incompatibilities in the expected and provided headers. I suppose that the wxPython version required by InteractiveHtmlBom doesn’t compile for Python 3.11…
In general, I suggest you use pyenv for handling python stuffs. Distro packages are better for software depending on them, not for installing pure-python applications.
Actually, InteractiveHtmlBom requireswxPython>=4.0 and since 4.2 Python 3.11 should be supported and the one that is being compilid is 4.2.1. So, something is not working. Don’t know if it’s an issue with wxPython or with openSUSE’s Python 3.11-devel package
Why not? Pipx is the recommended way to install python packages.
What I’m saying (and what I would add to the wiki) is:
When you have a complex dependency that must be compiled in a pipx package, such as wxPython, you can install the dependency using the openSUSE repositories, for instance:
sudo zypper in python311-wxPython
Then, you can use the --system-site-packages option of pipx to force it using the pre-compiled openSUSE package instead of compiling it:
@00sapo please understand, this is openSUSE, good luck doing that on MicroOS Use distrobox and have at it there…
System packages are a lot easier for new users to handle, and happy to support, they are easy to create, install and uninstall, even at a user level with py2pack.
Weird, no one is suggesting installing Python packages in the root of the filesystem anymore… even the openSUSE command suggests using pipx. Why this would be bad in MicroOS (never used it, AFAIK, it would only need transactional updates for installing RPM packages, isn’t it?)
@00sapo MicroOS is all about distrobox/podman for the end user (and flatpaks), leave the OS to do it’s thing.
If you want a system package it’s just two steps transactional-update pkg install <foo> the transactional-update apply to move to the next snapshot, no reboot required.
Yep, so my approach of zypper in or transactional-update pkg install + pipx install --system-site-packages should work, isn’t it? The thing is that if the user installs all the Python software in the same environment (the root of the filesystem in this case) it will soon find incompatibilities among packages. This is why pipx exists, actually.
@00sapo The file system is immutable, your second command probably won’t work, it likely would need doing from a transactional-update shell, exit and reboot… but test and see what works…
Not really, they are methods employed to get around system administration restrictions, so only the user $HOME will get borked
Pipx description: “Install and Run Python Applications in Isolated Environments”
Anyway, the OP is using Tumbleweed, hence the packaging response, if the user was on MicroOS, I would recommend distrobox, install there and run, which ever method is used…