Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation on MacOS through Homebrew fails because lxml #2329

Closed
w4nderlust opened this issue Feb 22, 2024 · 9 comments
Closed

Installation on MacOS through Homebrew fails because lxml #2329

w4nderlust opened this issue Feb 22, 2024 · 9 comments
Assignees

Comments

@w4nderlust
Copy link

Running MacOS 14 on an M1, when installing VisiData through Homebrew i get lxml related errors. Python 3.12.2 . Any suggestion?

==> Installing saulpw/vd/visidata
==> python3 -m venv --system-site-packages --without-pip /opt/homebrew/Cellar/vi
==> python3 -m pip --python=/opt/homebrew/Cellar/visidata/3.0.2/libexec/bin/pyth
==> python3 -m pip --python=/opt/homebrew/Cellar/visidata/3.0.2/libexec/bin/pyth
==> python3 -m pip --python=/opt/homebrew/Cellar/visidata/3.0.2/libexec/bin/pyth
==> python3 -m pip --python=/opt/homebrew/Cellar/visidata/3.0.2/libexec/bin/pyth
==> python3 -m pip --python=/opt/homebrew/Cellar/visidata/3.0.2/libexec/bin/pyth
==> python3 -m pip --python=/opt/homebrew/Cellar/visidata/3.0.2/libexec/bin/pyth
==> python3 -m pip --python=/opt/homebrew/Cellar/visidata/3.0.2/libexec/bin/pyth
==> python3 -m pip --python=/opt/homebrew/Cellar/visidata/3.0.2/libexec/bin/pyth
Last 15 lines from /Users/w4nderlust/Library/Logs/Homebrew/visidata/09.python3:
  /private/tmp/visidata--lxml-20240222-69608-7r5ytp/lxml-4.9.2/setup.py:117: SyntaxWarning: invalid escape sequence '\.'
    is_interesting_header = re.compile('^(zconf|zlib|.*charset)\.h$').match
  Building lxml version 4.9.2.
  /private/tmp/visidata--lxml-20240222-69608-7r5ytp/lxml-4.9.2/setup.py:67: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    import pkg_resources
  Building without Cython.
  Building against libxml2 2.9.13 and libxslt 1.1.35
  running clean
  removing 'build/temp.macosx-14.0-arm64-cpython-312' (and everything under it)
  removing 'build/lib.macosx-14.0-arm64-cpython-312' (and everything under it)
  'build/bdist.macosx-14.0-arm64' does not exist -- can't clean it
  'build/scripts-3.12' does not exist -- can't clean it
  removing 'build'
Failed to build lxml
ERROR: Could not build wheels for lxml, which is required to install pyproject.toml-based projects

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

/opt/homebrew/Library/Homebrew/utils/github/api.rb:356:in `raise_error': Validation Failed: [{"message"=>"The listed users and repositories cannot be searched either because the resources do not exist or you do not have permission to view them.", "resource"=>"Search", "field"=>"q", "code"=>"invalid"}] (GitHub::API::ValidationFailedError)
	from /opt/homebrew/Library/Homebrew/utils/github/api.rb:272:in `open_rest'
	from /opt/homebrew/Library/Homebrew/utils/github.rb:178:in `search'
	from /opt/homebrew/Library/Homebrew/utils/github.rb:182:in `search_results_items'
	from /opt/homebrew/Library/Homebrew/utils/github.rb:36:in `search_issues'
	from /opt/homebrew/Library/Homebrew/utils/github.rb:62:in `issues_for_formula'
	from /opt/homebrew/Library/Homebrew/exceptions.rb:502:in `fetch_issues'
	from /opt/homebrew/Library/Homebrew/exceptions.rb:497:in `issues'
	from /opt/homebrew/Library/Homebrew/exceptions.rb:553:in `dump'
	from /opt/homebrew/Library/Homebrew/brew.rb:143:in `rescue in <main>'
	from /opt/homebrew/Library/Homebrew/brew.rb:131:in `<main>'
/opt/homebrew/Library/Homebrew/formula.rb:2829:in `block in system': Failed executing: python3 -m pip --python=/opt/homebrew/Cellar/visidata/3.0.2/libexec/bin/python install --verbose --no-deps --no-binary=:all: --ignore-installed --no-compile /private/tmp/visidata--lxml-20240222-69608-7r5ytp/lxml-4.9.2 (BuildError)
	from /opt/homebrew/Library/Homebrew/formula.rb:2765:in `open'
	from /opt/homebrew/Library/Homebrew/formula.rb:2765:in `system'
	from /opt/homebrew/Library/Homebrew/language/python.rb:328:in `do_install'
	from /opt/homebrew/Library/Homebrew/language/python.rb:292:in `block (2 levels) in pip_install'
	from /opt/homebrew/Library/Homebrew/resource.rb:129:in `block (2 levels) in unpack'
	from /opt/homebrew/Library/Homebrew/download_strategy.rb:126:in `chdir'
	from /opt/homebrew/Library/Homebrew/download_strategy.rb:126:in `chdir'
	from /opt/homebrew/Library/Homebrew/download_strategy.rb:113:in `stage'
	from /opt/homebrew/Library/Homebrew/resource.rb:125:in `block in unpack'
	from /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `block in run'
	from /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `chdir'
	from /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `run'
	from /opt/homebrew/Library/Homebrew/resource.rb:226:in `stage_resource'
	from /opt/homebrew/Library/Homebrew/resource.rb:124:in `unpack'
	from /opt/homebrew/Library/Homebrew/resource.rb:98:in `stage'
	from /opt/homebrew/Library/Homebrew/language/python.rb:292:in `block in pip_install'
	from /opt/homebrew/Library/Homebrew/language/python.rb:290:in `each'
	from /opt/homebrew/Library/Homebrew/language/python.rb:290:in `pip_install'
	from /opt/homebrew/Library/Taps/saulpw/homebrew-vd/Formula/visidata.rb:72:in `install'
	from /opt/homebrew/Library/Homebrew/build.rb:177:in `block (3 levels) in install'
	from /opt/homebrew/Library/Homebrew/extend/kernel.rb:493:in `with_env'
	from /opt/homebrew/Library/Homebrew/build.rb:139:in `block (2 levels) in install'
	from /opt/homebrew/Library/Homebrew/formula.rb:1407:in `block in brew'
	from /opt/homebrew/Library/Homebrew/formula.rb:2997:in `block (2 levels) in stage'
	from /opt/homebrew/Library/Homebrew/extend/kernel.rb:493:in `with_env'
	from /opt/homebrew/Library/Homebrew/formula.rb:2996:in `block in stage'
	from /opt/homebrew/Library/Homebrew/resource.rb:129:in `block (2 levels) in unpack'
	from /opt/homebrew/Library/Homebrew/download_strategy.rb:126:in `chdir'
	from /opt/homebrew/Library/Homebrew/download_strategy.rb:126:in `chdir'
	from /opt/homebrew/Library/Homebrew/download_strategy.rb:113:in `stage'
	from /opt/homebrew/Library/Homebrew/resource.rb:125:in `block in unpack'
	from /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `block in run'
	from /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `chdir'
	from /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `run'
	from /opt/homebrew/Library/Homebrew/resource.rb:226:in `stage_resource'
	from /opt/homebrew/Library/Homebrew/resource.rb:124:in `unpack'
	from /opt/homebrew/Library/Homebrew/resource.rb:98:in `stage'
	from /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.1.4/lib/ruby/3.1.0/forwardable.rb:238:in `stage'
	from /opt/homebrew/Library/Homebrew/formula.rb:2976:in `stage'
	from /opt/homebrew/Library/Homebrew/formula.rb:1400:in `brew'
	from /opt/homebrew/Library/Homebrew/build.rb:133:in `block in install'
	from /opt/homebrew/Library/Homebrew/extend/kernel.rb:493:in `with_env'
	from /opt/homebrew/Library/Homebrew/build.rb:125:in `install'
	from /opt/homebrew/Library/Homebrew/build.rb:229:in `<main>'

This may be relevant: Significant-Gravitas/AutoGPT#16 (comment)

@w4nderlust w4nderlust added the bug label Feb 22, 2024
@anjakefala
Copy link
Collaborator

Hm! No ideas, but I'll look into it! Thanks for letting us know.

@anjakefala anjakefala self-assigned this Feb 22, 2024
@thetone
Copy link

thetone commented Feb 24, 2024

Same issue here. Mac 14.2.1 M1. Python 3.12.2

@geofftench
Copy link

geofftench commented Feb 27, 2024

Updating the lxml dependency from version 4.9.2 to 4.9.4 should resolve the issue. The installation completed successfully when I manually updated the dependency in the formula.

@anjakefala
Copy link
Collaborator

anjakefala commented Feb 27, 2024

I'll quickly make that update! Thanks for testing.

anjakefala added a commit to visidata/homebrew-vd that referenced this issue Feb 27, 2024
@anjakefala
Copy link
Collaborator

I made the change! Can you please confirm that the build is working?

@w4nderlust
Copy link
Author

I made the change! Can you please confirm that the build is working?

It seems it's not reflected in homebrew yet.
If you can provide me instructions I can test if it works for you.

@geofftench
Copy link

@anjakefala I reinstalled Visidata through Homebrew using your updated Formula, and it worked as expected. Thanks for making the update so quickly :)

@geofftench
Copy link

geofftench commented Feb 27, 2024

@w4nderlust You could use the following commands to install the Homebrew package with the updated formula:

git clone https://github.com/visidata/homebrew-vd.git
cp homebrew-vd/Formula/visidata.rb /usr/local/Homebrew/Library/Taps/saulpw/homebrew-vd/Formula/
brew install saulpw/vd/visidata

You may need to change the destination path, as I seem to recall that Homebrew uses a different base path on macOS on Apple ARM processors.

@w4nderlust
Copy link
Author

Confirm it worked for me too. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants