tdsmith / homebrew-ham

MIT License
12 stars 11 forks source link

brew install error: "ImportError: No module named setuptools" #13

Open geirgp opened 6 years ago

geirgp commented 6 years ago

Just tried to install chirp with brew on osx. Failed with this error:

$ brew install tdsmith/ham/chirp
==> Installing chirp from tdsmith/ham
==> Downloading https://trac.chirp.danplanet.com/chirp_daily/daily-20180614/chirp-daily-20180614.tar.gz
Already downloaded: /Users/geir/Library/Caches/Homebrew/chirp-20180614.tar.gz
==> Downloading https://files.pythonhosted.org/packages/33/bc/fa0b5347139cd9564f0d44ebd2b147ac97c36b2403943dbee8a25fd74012/virtualenv-16.0.0.tar.gz
Already downloaded: /Users/geir/Library/Caches/Homebrew/chirp--homebrew-virtualenv-16.0.0.tar.gz
==> python2 -c import setuptools... --no-user-cfg install --prefix=/tmp/chirp--homebrew-virtualenv-20180704-92252-3wfy8u/target --single-version-externally-managed --record=installed.txt
Last 15 lines from /Users/geir/Library/Logs/Homebrew/chirp/01.python2:
python2
-c
import setuptools, tokenize
__file__ = 'setup.py'
exec(compile(getattr(tokenize, 'open', open)(__file__).read()
  .replace('\r\n', '\n'), __file__, 'exec'))
--no-user-cfg
install
--prefix=/tmp/chirp--homebrew-virtualenv-20180704-92252-3wfy8u/target
--single-version-externally-managed
--record=installed.txt

Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named setuptools

If reporting this issue please do so at (not Homebrew/brew or Homebrew/core):
https://github.com/tdsmith/homebrew-ham/issues
fiatguy85 commented 6 years ago

I was having the same issue. I was eventually able to get chirp to install by removing python@2 and its dependancies:

brew uninstall python@2 gtk-mac-integration libxml2 py2cairo pygobject pygtk

Then I installed chirp and it pulled the dependancies and installed correctly. I guess it's something to do with a link or file in Python being overwritten possibly.

YJDave commented 3 years ago

Getting the same issue while installing graphviz. Reinstalling python3 worked for me, as mentioned here