🤔 Frequently Asked Questions

Quick Navigation

What is nbviewer?

nbviewer is a web application that allows you to enter the URL of a Jupyter Notebook file and renders that notebook as a static HTML web page, providing a stable link you can share with others. nbviewer also supports browsing collections of notebooks (e.g., in a GitHub repository) and rendering notebooks in other formats (e.g., slides, scripts).

nbviewer is part of the Jupyter Project, an open-source project that includes other projects such as Jupyter Notebook, JupyterLab, and JupyterHub.

This site is built on top of nbviewer.

What is ipynb.cn?

You can use it to render Jupyter Notebooks or browse notebook collections on GitHub. Compared to the main nbviewer.org site, we have replaced resources that are difficult to access in China, such as cloudflare and unpkg. Due to the open format of notebooks, we cannot guarantee that external resources referenced in notebook images will display properly.

How does nbviewer render notebooks?

nbviewer is written in Python and JavaScript, uses nbconvert to render notebooks, and uses Tornado as its web server.

You can install nbconvert and run jupyter nbconvert to get the same functionality (and more). See the nbconvert documentation for details.

Can nbviewer run my Python, Julia, R, Scala, etc. notebooks?

nbviewer does not execute notebooks. It only renders the inputs and outputs saved in the notebook document as a web page.

mybinder.org is a separate web service that allows you to open notebooks in an executable environment, making your code immediately reproducible by anyone, anywhere. nbviewer displays an Execute on Binder icon in its navigation bar.

Why doesn't the Execute on Binder button appear on my notebook?

nbviewer only supports notebooks stored on GitHub or as a Gist on Binder. Binder can directly support other providers on the mybinder.org website.

Why doesn't my notebook run correctly after clicking the Execute on Binder button?

Binder attempts to build a Docker image containing the notebook and requirements declared in the git repository. The build will fail if the repository has issues with the following files:

We recommend having the repository owner resolve the issue.

Why does clicking the Execute on Binder button cause Binder to fail?

Binder attempts to build a Docker image containing the notebooks and requirements in the git repository. These notebooks may have requirements needed to run correctly, such as libraries and data files. If the git repository declares these prerequisites in a supported way, Binder can install these prerequisites during its build process.

If a notebook doesn't run correctly in its Binder environment, we recommend letting the repository owner know about the issue or submitting a pull request to help resolve it.

Does embedded JavaScript in notebooks work on nbviewer rendered pages?

Yes. This site allows plots from plot.ly, Bokeh, and Altair to remain interactive. For example, when you visit a page, any arbitrary JavaScript on that page may be executed, just like any page you visit on the internet.

Can I load private notebooks on nbviewer?

ipynb.cn can only render notebooks accessible on the public internet. If you're working on a notebook on your local computer, you need to publish that notebook at a public URL (e.g., in a GitHub repository, as a gist) so that ipynb.cn can render it.

Hosting your own nbviewer server can open up other avenues for rendering private notebooks. For example, an nbviewer server on your university network could render notebook files accessible via URLs on that network. See the README in the nbviewer repository on GitHub for instructions and options.

Why do I get a 404: Not Found error from nbviewer?

The URL you're accessing most likely points to a notebook that has been moved or deleted. If you clicked a link on a site that led to a 404 error page, we recommend contacting the site owner to report the broken link. If a notebook author provided you with a URL, we suggest asking them for an updated link.

If you notice one of the links on ipynb.cn, please report it in the nbviewer issue tracker.

Why do I get a 4xx error when trying to view a notebook?

nbviewer fetches notebook files from upstream providers (such as GitHub, GitHub gist, public web servers). If the provider doesn't respond, the file received by nbviewer is invalid, the file is not publicly accessible, etc., a 4xx error will be displayed.

If you believe nbviewer is incorrectly displaying a 4xx error for an accessible, valid notebook URL, please submit a bug report in the nbviewer issue tracker.

Why do I get a 5xx or Fastly error when trying to view a notebook?

A 5xx error or Fastly's error page may indicate that the public ipynb.cn website is being redeployed or is down. If the problem persists for more than a few minutes, please open a bug report in the nbviewer issue tracker on GitHub, including the URL you were accessing and the error you received.

Why is nbviewer showing an outdated version of my notebook?

To reduce rendering time for popular notebooks, nbviewer caches rendered notebooks. The cache duration on ipynb.cn is approximately 10 minutes.

To invalidate the cache and force nbviewer to re-render a notebook page, add ?flush_cache=true to the URL.

How do I delete a notebook from nbviewer?

nbviewer does not store any notebooks, it only renders notebooks stored on the web when given their URL. If you've discovered a notebook that should be removed from the web, you need to find where it's hosted (e.g., GitHub) to update or delete it.

Can I use nbviewer to convert notebooks to formats other than HTML?

No. However, you can install nbconvert locally and run jupyter nbconvert to convert notebook files to various formats. See the nbconvert documentation for details.

Where is ipynb.cn hosted?

Our server source is hosted overseas for convenient access to notebook resources on the network, with high-speed access provided through Alibaba Cloud Global CDN.

Can I access ipynb.cn via https?

Yes. Please use https.

Can I run my own nbviewer server?

Absolutely. See the README file in the nbviewer repository for instructions and options.

How do I report bugs or suggest features for nbviewer?

Please select an appropriate issue template in the nbviewer issue tracker GitHub page.

What useful tools can be used with nbviewer?

Where can I ask additional questions?

Please post questions about using nbviewer on the following platforms:

If you want to propose enhancements to nbviewer or file bug reports, please open an issue in the jupyter/nbviewer project's issue page.

📢 Service Updates