question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error using jupyter-book (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

See original GitHub issue

Describe the bug

When I try to build my jupyter-book, I get an error. Other people working on the same git-repo don’t get the same error. I am working on a M1 Mac and have installed python through homebrew.

This is the error message I get

$ jupyter-book build mybook
sphinx.errors.ExtensionError: Could not import extension myst_nb (exception: dlopen(PATH1, 0x0002): tried: 'PATH1' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), 'PATH2' (no such file), 'PATH1' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')))

Reproduce the bug

  1. Use a M1 Mac
  2. (Install brew if not installed)
  3. Open terminal of choice
  4. Write “brew install python”
  5. Write “pip install jupyter-book”
  6. Write “jupyter build <your-jupyter-book>”

List your environment

Ironically, I cannot even use jupyter-book --version, as I get the same error.

jupyter-book-0.13.1

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jacobInavcommented, Dec 5, 2022

It didn’t work, but I found a solution. I uninstalled all packages and then cleaned the cache. Didn’t know pip kept a cache after the packages are uninstalled. Then I uninstalled python and reinstalled everything in the terminal running on arm64. Thanks for the help!

0reactions
stevejpurvescommented, Dec 5, 2022

ok, glad you got past it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

(mach-o file, but is an incompatible architecture (have 'x86_64 ...
I got an error like this too. Solved it after a lot of trial & error. The Problem: my brew was still running...
Read more >
mach-o file, but is an incompatible architecture (have (x86_64 ...
I've checked the logs here microsoft/vscode#158109 (comment) This seems to be an issue with a package in Python and isn't a problem caused ......
Read more >
M1 mac: mach-o file, but is an incompatible architecture (have ...
I use conda from miniforge for python packages etc. This works. This means that I don't know first hand how pypi works, I...
Read more >
Launch into interactive computing interfaces - Jupyter Book
This lets readers quickly interact with your content in a traditional coding interface. They do so by clicking a Launch Button that takes...
Read more >
Publish your book online - Jupyter Book
In this tutorial, we'll cover how to publish your book online with GitHub Pages, a popular and free online hosting platform. Create an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found