betatim / notebook-as-pdf

Save Jupyter Notebooks as PDF
BSD 3-Clause "New" or "Revised" License
370 stars 73 forks source link

C++ dependency for pikepdf #1

Closed epogrebnyak closed 4 years ago

epogrebnyak commented 4 years ago

I have a dependency issue which gives an 500 error in Jupyter, when launching a notebook:

Maybe there should be an uninstall instruction too in README.md for notebook-as-pdf?

Trying to figure out how to install C++ for me.

      File "D:\Anaconda3\lib\site-packages\notebook_as_pdf\__init__.py", line 17, in <module>
        import pikepdf
      File "D:\Anaconda3\lib\site-packages\pikepdf\__init__.py", line 23, in <module>
        raise ImportError(msg) from _e
    ImportError: pikepdf's extension library failed to import
    You may need to install Microsoft Visual C++ 2015-2019 Redistributable (x64) 14.24.28127 or newer.
[E 09:58:58.821 NotebookApp] {
      "Host": "localhost:8888",
      "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0",
      "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
      "Accept-Language": "ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3",
      "Accept-Encoding": "gzip, deflate",
      "Connection": "keep-alive",
      "Referer": "http://localhost:8888/tree",
      "Cookie": "username-localhost-8888=\"2|1:0|10:1587452334|23:username-localhost-8888|44:NDcwOWExYzVmZDkwNGNmYjhjMjhlNzVlYjJkYzFmZDA=|cae321ef80ae41f77680e7c093e875a1fe0fe404d8a71f478da4e19adc05adf6\"; _xsrf=2|74b6ff90|1909c13bb95219015f931aeab6200e4b|1586880665; username-localhost-8889=\"2|1:0|10:1587452291|23:username-localhost-8889|44:MTY2Y2E3OTMwYTRiNGNhNGIzYzAxNzU4NDEwYmFjMjY=|8195ac1e2f0f3c9a58234ab56b31c4149b95c3124ae8ca2cb4a168cf892c8cd1\"",
      "Upgrade-Insecure-Requests": "1"
    }
[E 09:58:58.823 NotebookApp] 500 GET /notebooks/corporate2.ipynb (127.0.0.1) 312.82ms referer=http://localhost:8888/tree
epogrebnyak commented 4 years ago

pikepdf has a link for windows-runtime-requirements, but in my case I seem stuck in between VC++ versions - I got everything from v 2008 to v2017, but not v 2015.

[30B8:1174][2020-04-21T10:06:01]e000: Error 0x80070666: Cannot install a product when a newer version is installed.

Not a notebook-as-pdf issue, may probably close here, but I maybe uninstall tip in README.md can be helpful.