tdsmith / homebrew-ham

MIT License
12 stars 11 forks source link

chirp install fails in "python setup.py egg_info" because libxml2 can't be imported #16

Closed kevinayres closed 5 years ago

kevinayres commented 5 years ago

==> Installing tdsmith/ham/chirp dependency: libxml2 ==> Downloading https://homebrew.bintray.com/bottles/libxml2-2.9.8_1.mojave.bottle.tar.gz ######################################################################## 100.0% ==> Pouring libxml2-2.9.8_1.mojave.bottle.tar.gz ==> Caveats libxml2 is keg-only, which means it was not symlinked into /usr/local, because macOS already provides this software and installing another version in parallel can cause all kinds of trouble.

If you need to have libxml2 first in your PATH run: echo 'export PATH="/usr/local/opt/libxml2/bin:$PATH"' >> ~/.bash_profile

For compilers to find libxml2 you may need to set: export LDFLAGS="-L/usr/local/opt/libxml2/lib" export CPPFLAGS="-I/usr/local/opt/libxml2/include"

==> Summary 🍺 /usr/local/Cellar/libxml2/2.9.8_1: 281 files, 10.5MB ==> Installing tdsmith/ham/chirp ==> Downloading https://trac.chirp.danplanet.com/chirp_daily/daily-20181014/chirp-daily-201810 ######################################################################## 100.0% ==> Downloading https://files.pythonhosted.org/packages/4e/8b/75469c270ac544265f0020aa7c4ea925 ######################################################################## 100.0% ==> python2 -c import setuptools... --no-user-cfg install --prefix=/private/tmp/chirp--homebre ==> python2 -s /private/tmp/chirp--homebrew-virtualenv-20190104-35494-ssqssy/target/bin/virtua ==> Downloading https://files.pythonhosted.org/packages/1f/3b/ee6f354bcb1e28a7cd735be98f39ecf8 ######################################################################## 100.0% ==> /usr/local/Cellar/chirp/20181014/libexec/bin/pip install -v --no-deps --no-binary :all: -- ==> /usr/local/Cellar/chirp/20181014/libexec/bin/pip install -v --no-deps --no-binary :all: -- Last 15 lines from /Users/kevinayres/Library/Logs/Homebrew/chirp/04.pip: File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/resolve.py", line 102, in resolve self._resolve_one(requirement_set, req) File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/resolve.py", line 256, in _resolve_one abstract_dist = self._get_abstract_dist_for(req_to_install) File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/resolve.py", line 209, in _get_abstract_dist_for self.require_hashes File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 298, in prepare_linked_requirement abstract_dist.prep_for_dist(finder, self.build_isolation) File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 126, in prep_for_dist self.req.run_egg_info() File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/req/req_install.py", line 473, in run_egg_info command_desc='python setup.py egg_info') File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/utils/misc.py", line 705, in call_subprocess % (command_desc, proc.returncode, cwd)) InstallationError: Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-req-build-6KgkUK/

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

majodi commented 5 years ago

I get:

InstallationError: Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-req-build-gj08BJ/

I don't know if this is related.

SecKatie commented 5 years ago

I am having the same issue:

$ brew install tdsmith/ham/chirp ==> Installing chirp from tdsmith/ham ==> Downloading https://trac.chirp.danplanet.com/chirp_daily/daily-20181014/chir Already downloaded: /Users/joshuamulliken/Library/Caches/Homebrew/downloads/cd200b1aa50435e87c2a48793f4589ada7ca06295f71779b33e8de0d1f222dff--chirp-daily-20181014.tar.gz ==> Downloading https://github.com/pypa/virtualenv/archive/16.2.0.tar.gz Already downloaded: /Users/joshuamulliken/Library/Caches/Homebrew/downloads/bfb26e5e9fbf90082f14312f9f0af39c489fc665de9adcc2c003f3e4c533bfd6--virtualenv-16.2.0.tar.gz ==> python2 -c import setuptools... --no-user-cfg install --prefix=/private/tmp/ ==> python2 -s /private/tmp/chirp--homebrew-virtualenv-20190108-27899-xmo9ix/tar ==> Downloading https://files.pythonhosted.org/packages/1f/3b/ee6f354bcb1e28a7cd Already downloaded: /Users/joshuamulliken/Library/Caches/Homebrew/downloads/02f61bdae6cc8872d79c013487edd1005203f8d4a4ffc21ac75d122ed75b4f5f--pyserial-3.2.1.tar.gz ==> /usr/local/Cellar/chirp/20181014/libexec/bin/pip install -v --no-deps --no-b ==> /usr/local/Cellar/chirp/20181014/libexec/bin/pip install -v --no-deps --no-b Last 15 lines from /Users/joshuamulliken/Library/Logs/Homebrew/chirp/04.pip: File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/resolve.py", line 102, in resolve self._resolve_one(requirement_set, req) File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/resolve.py", line 256, in _resolve_one abstract_dist = self._get_abstract_dist_for(req_to_install) File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/resolve.py", line 209, in _get_abstract_dist_for self.require_hashes File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 298, in prepare_linked_requirement abstract_dist.prep_for_dist(finder, self.build_isolation) File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 126, in prep_for_dist self.req.run_egg_info() File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/req/req_install.py", line 473, in run_egg_info command_desc='python setup.py egg_info') File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/utils/misc.py", line 705, in call_subprocess % (command_desc, proc.returncode, cwd)) InstallationError: Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-req-build-fxXJ1J/

fumb1e commented 5 years ago

Ditto, but I'm on 10.13 High Sierra.

Here's the output from brew gist-logs chirp : https://gist.github.com/fumb1e/8b982465e39bb86d38c9e4c4abdbb37f

counterbeing commented 5 years ago

And here's one from me on Mojave https://gist.github.com/counterbeing/02e9d17802d0aa730686fc53c3de604b

counterbeing commented 5 years ago

It feels like the key to this error is ImportError: No module named libxml2. I've tried reinstalling libxml2 a few different ways, but it doesn't seem to have an impact.

sgtsquiggs commented 5 years ago

Getting similar error.

==> Installing chirp from tdsmith/ham
==> Downloading https://trac.chirp.danplanet.com/chirp_daily/daily-20181014/chirp-daily-20181014.tar.gz
Already downloaded: /Users/matthew/Library/Caches/Homebrew/downloads/cd200b1aa50435e87c2a48793f4589ada7ca06295f71779b33e8de0d1f222dff--chirp-daily-20181014.tar.gz
==> Downloading https://github.com/pypa/virtualenv/archive/16.2.0.tar.gz
Already downloaded: /Users/matthew/Library/Caches/Homebrew/downloads/bfb26e5e9fbf90082f14312f9f0af39c489fc665de9adcc2c003f3e4c533bfd6--virtualenv-16.2.0.tar.gz
==> python2 -c import setuptools... --no-user-cfg install --prefix=/private/tmp/chirp--homebrew-virtualenv-20190118-10369-q23gg4/target --install-scripts=/private/tmp/chirp--homebrew-vi
==> python2 -s /private/tmp/chirp--homebrew-virtualenv-20190118-10369-q23gg4/target/bin/virtualenv -p python2 /usr/local/Cellar/chirp/20181014/libexec
==> Downloading https://files.pythonhosted.org/packages/1f/3b/ee6f354bcb1e28a7cd735be98f39ecf80554948284b41e9f7965951befa6/pyserial-3.2.1.tar.gz
Already downloaded: /Users/matthew/Library/Caches/Homebrew/downloads/02f61bdae6cc8872d79c013487edd1005203f8d4a4ffc21ac75d122ed75b4f5f--pyserial-3.2.1.tar.gz
==> /usr/local/Cellar/chirp/20181014/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/chirp--pyserial-20190118-10369-295xtv/pyserial-3.2.1
==> /usr/local/Cellar/chirp/20181014/libexec/bin/pip install -v --no-deps --no-binary :all: --ignore-installed /private/tmp/chirp-20190118-10369-3jnb66/chirp-daily-20181014
Last 15 lines from /Users/matthew/Library/Logs/Homebrew/chirp/04.pip:
  File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/resolve.py", line 102, in resolve
    self._resolve_one(requirement_set, req)
  File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/resolve.py", line 256, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/resolve.py", line 209, in _get_abstract_dist_for
    self.require_hashes
  File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 298, in prepare_linked_requirement
    abstract_dist.prep_for_dist(finder, self.build_isolation)
  File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 126, in prep_for_dist
    self.req.run_egg_info()
  File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/req/req_install.py", line 473, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/utils/misc.py", line 705, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-req-build-7VAZeG/

My brew config:

HOMEBREW_VERSION: 1.9.2
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: 7be9ac1e9d550df18392550d611c5ff10b91292b
Last commit: 4 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: c8c56a16a2c6b496bd8c088204516b11b5006960
Core tap last commit: 6 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_LOGS: /Users/matthew/Library/Logs/Homebrew
HOMEBREW_VISUAL: nano
CPU: octa-core 64-bit haswell
Homebrew Ruby: 2.3.7 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.7/bin/ruby
Clang: 10.0 build 1000
Git: 2.17.1 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 1.8.0_91
macOS: 10.14.2-x86_64
CLT: N/A
Xcode: 10.1
XQuartz: 2.7.7 => /opt/X11
k2kirov commented 5 years ago

Is there a workaround for this issue? I'm having the same trouble :(

recmo commented 5 years ago

ImportError: No module named libxml2

Same here.

berezhinskiy commented 5 years ago

Same:

File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/resolve.py", line 294, in _resolve_one abstract_dist = self._get_abstract_dist_for(req_to_install) File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/resolve.py", line 242, in _get_abstract_dist_for self.require_hashes File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 349, in prepare_linked_requirement abstract_dist.prep_for_dist(finder, self.build_isolation) File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/operations/prepare.py", line 158, in prep_for_dist self.req.prepare_metadata() File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/req/req_install.py", line 536, in prepare_metadata self.run_egg_info() File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/req/req_install.py", line 615, in run_egg_info command_desc='python setup.py egg_info') File "/usr/local/Cellar/chirp/20181014/libexec/lib/python2.7/site-packages/pip/_internal/utils/misc.py", line 761, in call_subprocess % (command_desc, proc.returncode, cwd)) InstallationError: Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-req-build-b215kx/

floathub commented 5 years ago

Same on 10.11 and 10.12.

tdsmith commented 5 years ago

Whoops! This broke us: https://github.com/Homebrew/homebrew-core/pull/35494

We'll have to figure out how to get Python 2 bindings to libxml in order to resolve this. Sorry that I was asleep at the switch here.

floathub commented 5 years ago

Thanks for the update, and for all the remarkable work on Chirp!

tdsmith commented 5 years ago

I didn't trust the libxml bindings on pypi, so I updated the formula to bundle the current libxml2 and build our own bindings. brew update && brew reinstall chirp should work now; please open an issue if something is still broken!