2

I've installed byobu on my mac os x mojave. 10.14.xx, however when I run byobu-config the prompt returns the message

ERROR:Could not import the python snack module

I've tried pip3 install snack with no effect. it gives me the

pip3 install snack
Collecting snack
  Using cached snack-0.0.3.tar.gz (155 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/wj/hcvrw53j2rlb_htp5ppq84t80000gn/T/pip-install-u4a4xlgu/snack/setup.py'"'"'; __file__='"'"'/private/var/folders/wj/hcvrw53j2rlb_htp5ppq84t80000gn/T/pip-install-u4a4xlgu/snack/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/wj/hcvrw53j2rlb_htp5ppq84t80000gn/T/pip-install-u4a4xlgu/snack/pip-egg-info
         cwd: /private/var/folders/wj/hcvrw53j2rlb_htp5ppq84t80000gn/T/pip-install-u4a4xlgu/snack/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/wj/hcvrw53j2rlb_htp5ppq84t80000gn/T/pip-install-u4a4xlgu/snack/setup.py", line 47
        print GCC_VERSION
                        ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print(GCC_VERSION)?
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Gehock
  • 11
  • 2

4 Answers4

1

The correct solution is to install newt, not snack which is a scientific visualization library. The "snack" dependency of newt refers to snack.py file in newt library, not to be confused with the snack library (which is a scientific visualisation library). snack.py offers windowing abilities for byobu-config.

To install using conda, https://anaconda.org/conda-forge/newt

conda install -c conda-forge newt
Sindhu S
  • 942
  • 1
  • 10
  • 23
0

This worked for me:

sudo zypper in python3-newt

If you're on another distro, try installing python3-newt using your package manager and it should fix the problem.

Didier A.
  • 4,609
  • 2
  • 43
  • 45
0

Old one, I know, but this particular error is because you were trying to install a Python 2 module with Python 3's Pip. A tell-tale sign is the error being about print statement which is a function in Python 3.

-1

About the error code

According to the Python documentation:

This module makes available standard errno system symbols. The value of each symbol is the corresponding integer value. The names and descriptions are borrowed from linux/include/errno.h, which should be pretty all-inclusive.

Error code 1 is defined in errno.h and means Operation not permitted.

About your error

Your setuptools do not appear to be installed. Just follow the Installation Instructions from the PyPI website.

If it's already installed, try

pip install --upgrade setuptools

If it's already up to date, check that the module ez_setup is not missing. If it is, then

pip install ez_setup

Then try again

pip install snack

If it's still not working, maybe pip didn't install/upgrade setup_tools properly so you might want to try

Refer to original answer: https://stackoverflow.com/a/36025294/10798048

Dhruv Agarwal
  • 558
  • 6
  • 15