2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

M1 MacでScrapyがImportError: ...mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))となる場合の対処法

Posted at

Scrapyを使おうとすると一瞬M1では使えないかと思ったがlxmlをソースからビルドすることで解決した。
(macOS Monterey 12.4, MacBook Pro 2020 M1)

ImportError: dlopen(/opt/homebrew/lib/python3.10/site-packages/lxml/etree.cpython-310-darwin.so, 0x0002): tried: '/opt/homebrew/lib/python3.10/site-packages/lxml/etree.cpython-310-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e'))

$ pip uninstall lxml
$ pip install --no-binary lxml lxml 

2
1
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
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?