Ameba Ownd

アプリで簡単、無料ホームページ作成

Jupyter notebook download as pdf error

2021.12.17 21:49






















Building intelligent escalation chains for modern SRE. Featured on Meta. Now live: A fully responsive profile. Reducing the weight of our footer. Related 9. Hot Network Questions. Question feed. Stack Overflow works best with JavaScript enabled. Accept all cookies Customize settings. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Podcast what if you could invest in your favorite developer? Who owns this outage?


Building intelligent escalation chains for modern SRE. Featured on Meta. Now live: A fully responsive profile. Reducing the weight of our footer. Related 2. Hot Network Questions. Connect and share knowledge within a single location that is structured and easy to search. So, i've been trying to save a jupyter notebook as PDF but i just can't figure out how to do this. The first thing i try is from the file menu just download as PDF, but doing that results in:.


Anyone have idea how to fix whatever is wrong? I read somewhere that you can use --no-install-recommends for texlive and extra to reduce to the dl. If you are on a Mac and have Homebrew installed, open a terminal shell and install pandoc typing the command: brew install pandoc. There is a related Github issue.


Next, if you aren't using Anaconda or haven't already, you must install pandoc either by following the instructions on their website or, on Linux, as follows:. You can now navigate to the folder that holds your IPython Notebook and run the following command:. As the comments to the question say, you will need pandoc and latex e. I installed pandoc with Homebrew, it took just a second.


Having pandoc and TeXShop, I could generate latex but not pdf on the command line. Exploring the latex. After installing all of these adjustbox. However, the result looks a little too funky for my taste. It is too bad that printing the html from Safari loses the syntax coloring. Otherwise, it doesn't look so bad. This is all on OS X. After execution of these commands, close the opened notebooks refresh the home page Or restart the kernel of the opened notebook.


Now try to download notebook as a pdf :. The approach with wkhtmltopdf is the only approach I found works well and provides high quality pdfs. Other approaches described here are problematic, syntax highlighting does not work or graphs are messed up. If the above steps doesn't generate full PDF of the Jupyter notebook probably because Chrome, some times, don't print all the outputs because Jupyter make a scroll for big outputs ,.


In your Jupyter Notebook, click Cell on top of the jupyter notebook. After a frantic set of searches and trials, both of them were solved. This requires both tex and pandoc ; both jumbo external programs cannot installed by Python's pip. This should take nearly an hour to complete in the usual case. If the problem persists, you might have to install MacTeX distro. For Ubuntu: install vanilla TeXLive from the network installer -- not through apt-get. Then install pandoc using apt-get.


I had all kinds of problems figuring this out as well. I don't know if it will provide exactly what you need, but I downloaded my notebook as an HTML file, then pulled it up in my Chrome browser, and then printed it as a PDF file, which I saved. It captured all my code, text and graphs.


As a first note this is IPython, not jupyter notebook, the difference is complicated, so let's gloss over it. Are you using conda? If you are using conda than you should be able to "conda install pandoc", it will be wayyyy easier. When you type a command in bash, like "jupyter", or "python" or "pandoc", linux need to know where to "search" for things.


It will search in each of these folder in order , and stop on the first where it finds the command you asked. Oh no, i've messed up my path What is better is to append, or prepend to path depending of wether you want things to have high prepend , or low append precedence.


You will even probably have in this file already some stuff, for example I have that added by conda :. You might need to restart your jupyter notebook server for things to work, but if PATH is set correctly, and in bash you get something along:.


Side notes: if you are on linux you like can apt install pandoc one almost never download and install a an app by downloading it manually on linux. If you wonder "where" a command like pandoc, jupyter, python is on linux, you can use which , to tell you where things are:. This might help you to figure things out better, if not we can try to dig in more details. Sorry, something went wrong.


Thanks so much for the information. It was pretty helpful, I still have a lot more to learn. Here is some more information I think could be helpful. I am a graduate student working on my advisers server in seashell I am told? I am using miniconda downloaded on my own special area?