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.

jupyter-book build: NotImplementedError on Windows Python 3.8

See original GitHub issue

Maintainer Edit:

This issue is related to jupyter/nbclient#85

So it looks like, for now on Windows, you need to use Python 3.7.


Describe the bug

I am following the tutorial set-up https://jupyterbook.org/start/build.html In the second step it says use jupyter-book build mybookname to build the book - i get an error. Here is an error: File "C:\Program Files\Python38\lib\asyncio\events.py", line 501, in add_reader raise NotImplementedError NotImplementedError Here is a screenshot of my terminal: image

To Reproduce

Steps to reproduce the behavior:

  1. pip install -U jupyter-book
  2. jupyter-book create mybookname
  3. jupyter-book build mybookname

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:5
  • Comments:67 (31 by maintainers)

github_iconTop GitHub Comments

2reactions
jbeanlandcommented, Nov 23, 2021

@chrisjsewell (I hope you’re the right person to tag) this seems to be fixed now from Tornado==6.1 and pyzmq==22.1.0 From cpython 3.8, ayncio changed the default eventloop and it basically broke Tornado. Their 6.1 release finally fixed that. I am able to successfully build a book using cpython 3.9 and jbook 0.12.1 using these dependency versions.

What docs/build steps/requirements would need to be updated to confirm/inform about this fix? here and here are the most obvious. Probably pin these versions in the setup.cfg? How does the CI work? does it do any automated windows testing?

2reactions
firasmcommented, Jan 6, 2021

For anyone that stumbles on to this and is looking for the fix, here is what worked:

pip uninstall jupyter-book
conda create -n workenv python=3.7
conda activate workenv
pip install jupyter-book

Description of what the steps above:

  • uninstall jupyter-book (for some reason it has a dash on windows but no dash on macOS/linux!)
  • create a new conda environment with python 3.7 (thanks @phaustin!)
  • activate the env
  • reinstall jupyter-book

I am not 100% sure uninstalling and reinstalling jupyter-book is necessary, but after it worked, I wasn’t going to touch it again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jupyter Notebook with Python 3.8 - NotImplementedError
EDIT. This issue exists in older versions of Jupyter Notebook and was fixed in version 6.0.3 (released 2020-01-21).
Read more >
Working on Windows
If you're running a recent version of Windows 10 and would like to build with Python 3.8 or encounter issues not covered in...
Read more >
NotImplementedError when installing Jupyter Notebook on ...
If you try to install Jupyter notebook under Windows and Python 3.8, it will install without any warning, as if everything were OK....
Read more >
Overview — Data Science Study - GitHub Pages
Jupyter Book is now also tested against Windows OS. However, there is a known incompatibility for notebook execution when using Python 3.8.
Read more >
book.pdf
easier if you install the Windows Subsystem for Linux (WSL) which will ... ˜/Documents/codebook$ conda create --name codebook python=3.8.
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