Opened 7 months ago
Last modified 7 months ago
#69788 assigned defect
byobu @5.133: byobu-config could not import the python snack module
Reported by: | danielbair (Daniel Bair) | Owned by: | l2dy (Zero King) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ||
Port: | byobu |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
When trying to run 'byobu-config' I get,
ERROR: Could not import the python snack module.
So I attempted to install snack with 'pip install snack' and that failed with an error. Then searching for that error lead me to learn that snack hasn't been ported to python3 and there is no solution (see https://apple.stackexchange.com/questions/423515/byobu-not-working-on-new-installation-of-macos).
Change History (6)
comment:1 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Keywords: | byobu-config removed |
Summary: | byobu @ 5.133 byobu-config could not import the python snack module → byobu @5.133: byobu-config could not import the python snack module |
comment:2 Changed 7 months ago by l2dy (Zero King)
Version: | 2.9.3 |
---|
comment:3 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
We're not talking about python integration. Here we're just talking about being able to run byobu-config
at all. #59930 is just talking about being able to run byobu
at all. If those basic programs of this port don't work and can't be fixed to work, there's no point to having this port, is there?
comment:4 Changed 7 months ago by danielbair (Daniel Bair)
So far all other byobu programs except byobu-config
seem to be working. I have the latest MacPorts running on Sonoma. I do not know if byobu upstream has a fix for this yet.
comment:5 follow-up: 6 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
Here's the bug report filed with byobu about this in 2021 with no response: https://bugs.launchpad.net/byobu/+bug/1914879
Daniel, I got sidetracked a bit by your mention of the snack pip module. It took me a bit of research to understand that byobu is not looking for the snack 0.0.3 module currently on PyPI at https://pypi.org/project/snack/, which is an abandoned project of Cornell University for "Stochastic Neighbor and Crowd Kernel (SNaCK) embeddings: Quick and dirty visualization of large-scale datasets via concept embeddings". Homepage: https://vision.cornell.edu/se3/concept-embeddings/ (expired SSL certificate). GitHub: https://github.com/cornelltech/snack
Instead, byobu is looking for the snack module that is part of libnewt's python bindings and is used for developing text-based user interfaces. Hence the need for providing libnewt's python bindings in MacPorts as requested in #44044.
comment:6 Changed 7 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to ryandesign:
Hence the need for providing libnewt's python bindings in MacPorts as requested in #44044.
This is now done and byobu-config now works if you first run sudo port install py312-libnewt
and then run BYOBU_PYTHON=python3.12 byobu-config
. Ideally, the byobu port would be enhanced to depend on py312-libnewt and to arrange for python 3.12 to be used automatically.
Weird: the byobu port doesn't mention that it uses python. But you're right, the contents of
byobu-config
(aside from comments) are just:#!/bin/sh -e
So the byobu port should declare a library dependency on whatever newest version of python it is compatible with and the build process should ensure that that version of python is used.
You can use
pip
to install modules for your own use in your own user directories (e.g. in a virtualenv) but shouldn't use it to try to install things into the system (MacPorts) directories.