3
3

More than 5 years have passed since last update.

OSX10.8 で、Pythonのbzrlib がみつからないというエラーで brew install がコケる問題

Last updated at Posted at 2013-06-23

新しいmacbookで、homebrewで色々入れていたら、以下のようなエラーが出た。

$ brew install emacs --HEAD --cocoa
==> Cloning bzr://http://bzr.savannah.gnu.org/r/emacs/trunk
bzr: ERROR: Couldn't import bzrlib and dependencies.
Please check the directory containing bzrlib is on your PYTHONPATH.

Traceback (most recent call last):
  File "/usr/local/bin/bzr", line 74, in <module>
    import bzrlib
ImportError: No module named bzrlib
Error: Failure while executing: /usr/local/bin/bzr checkout --lightweight http://bzr.savannah.gnu.org/r/emacs/trunk /Library/Caches/Homebrew/emacs--bzr

他の何かのパッケージでもエラーが出たような気がする。
bzrというコマンドが、Pythonのbzrlibというパッケージを参照しているけど、MacのシステムのPythonがそれをみつけられてなかった。

Homebrewが入れたbzrには、ちゃんとbzrlibがついてきてるので、シンボリックリンク張ったら直った。

$ sudo ln  -s /usr/local/Cellar/bazaar/2.5.1/lib/python2.7/site-packages/bzrlib /Library/Python/2.7/site-packages/bzrlib

あるいは、pythonもHomebrewから入れるとこういう問題が起きないのかな? (未検証)
あと、以前はなぜこの問題がなかったのかもよくわからない。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3