Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

byobu: "Could not import python snack module" error #43989

Closed
tonysh opened this issue Sep 16, 2015 · 8 comments
Closed

byobu: "Could not import python snack module" error #43989

tonysh opened this issue Sep 16, 2015 · 8 comments

Comments

@tonysh
Copy link

tonysh commented Sep 16, 2015

This is similar to #17542 (comment), as @DomT4 suggested, opened a new issue here.

$ byobu-config
ERROR: Could not import the python snack module

Tried:

$ brew install newt
Warning: newt-0.52.18 already installed

OS X Yosemite 10.10.5, and

$ brew --version
0.9.5 (git revision 1bacc; last commit 2015-09-09)
$ brew info byobu
byobu: stable 5.94 (bottled)
Text-based window manager and terminal multiplexer
http://byobu.co
Conflicts with: ctail
/usr/local/Cellar/byobu/5.94 (155 files, 1.0M) *
  Poured from bottle
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/byobu.rb
==> Dependencies
Required: coreutils ✔, gnu-sed ✔, tmux ✔, newt ✔
==> Caveats
Add the following to your shell configuration file:
  export BYOBU_PREFIX=$(brew --prefix)
@tonysh tonysh changed the title "Could not import python snack module" error byobu: "Could not import python snack module" error Sep 16, 2015
@tdsmith
Copy link
Contributor

tdsmith commented Sep 16, 2015

Can you share the output of brew doctor, brew config, and brew info newt?

ref #43970

@tonysh
Copy link
Author

tonysh commented Sep 16, 2015

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: Your Homebrew is outdated.
You haven't updated for at least 24 hours. This is a long time in brewland!
To update Homebrew, run `brew update`.

$ brew config
HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: 1bacc3983b254bb8d942e5285ef1e5096d2c1220
Last commit: 6 days ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: 8-core 64-bit haswell
OS X: 10.10.5-x86_64
Xcode: 6.4
CLT: N/A
Clang: 6.1 build 602
X11: N/A
System Ruby: 2.0.0-p481
Perl: /usr/bin/perl
Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.10_2/Frameworks/Python.framework/Versions/2.7/bin/python2.7
Ruby: /usr/bin/ruby
Java: 1.8.0_51

$ brew info newt
newt: stable 0.52.18 (bottled)
Library for color text mode, widget based user interfaces
https://fedorahosted.org/newt/
/usr/local/Cellar/newt/0.52.18 (84 files, 596K) *
  Built from source with: --with-python
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/newt.rb
==> Dependencies
Required: gettext ✔, popt ✔, s-lang ✔
==> Options
--with-python
        Build with python support

@tdsmith
Copy link
Contributor

tdsmith commented Sep 16, 2015

What files are in /usr/local/Cellar/newt/0.52.18/lib/python2.7/site-packages? Can you share brew gist-logs newt?

@tonysh
Copy link
Author

tonysh commented Sep 17, 2015

@tdsmith :

No /usr/local/Cellar/newt/0.52.18/lib/python2.7/site-packages folder here.

$ ll /usr/local/Cellar/newt/0.52.18/lib/python2.7
ls: /usr/local/Cellar/newt/0.52.18/lib/python2.7: No such file or directory

$ ls /usr/local/Cellar/newt/0.52.18/lib/
libnewt.0.52.18.dylib libnewt.0.52.dylib    libnewt.a             libnewt.so            pkgconfig

$ brew gist-logs newt
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

https://gist.github.com/1175f2837bd441dccab4

@tdsmith
Copy link
Contributor

tdsmith commented Sep 17, 2015

ah. Looking at newt's configure script, it's not very clever. newt only looks in /usr/include for python headers. You should install the Xcode CLT to build the snack module with xcode-select --install and then run brew reinstall newt byobu.

@tonysh
Copy link
Author

tonysh commented Sep 17, 2015

It WORKED, @tdsmith thanks a lot for your help!

@timothybasanov
Copy link

I had same problem. In addition to xcode --install and brew reinstall best byobu I missed brew python and brew install python was also required.

@gusutabopb
Copy link

I use anaconda as my Python distribution and had the same problem. To fix it, I followed the messages shown after reinstalling newt, namely:

mkdir -p /Users/<myusername>/.local/lib/python2.7/site-packages
echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/<myusername>/.local/lib/python2.7/site-packages/homebrew.pth

Works fine now!

@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants