chrisjsewell / ipypublish

A workflow for creating and editing publication ready scientific reports and presentations, from one or more Jupyter Notebooks, without leaving the browser!
http://ipypublish.readthedocs.io
BSD 3-Clause "New" or "Revised" License
224 stars 37 forks source link

The 'ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.8"' distribution was not found and is required by ruamel.yaml #102

Closed lightsquared closed 5 years ago

lightsquared commented 5 years ago

Bug Report

Describe the bug

Attempt to publish a Jupyter Notebook to pdf and get the following error:

Run Failed: The 'ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.8"' distribution was not found and is required by ruamel.yaml

To Reproduce

Steps to reproduce the behavior:

  1. Clean install of miniconda (Aug 25, 2019)
  2. conda env create -f environment.yml
  3. nbpublish -pdf -lb -f latex_ipypublish_nocode philadelphia_refinery.ipynb

Minimal Notebook Example

ipypublish_example.txt

Expected Behaviour

Generate a pdf of the ipynb file.

Runtime Information

(please complete the following information)

Logging

(philadelphia_refinery) Shonns-MacBook-Pro:4_analysis skmcneill$ nbpublish -pdf -lb -f latex_ipypublish_nocode philadelphia_refinery.ipynb INFO:ipypublish:started ipypublish v0.10.8 at Sun Aug 25 11:41:47 2019 INFO:ipypublish:logging to: /Users/skmcneill/Documents/github/philadelphia_refinery/4_analysis/converted/philadelphia_refinery.nbpub.log INFO:ipypublish:running for ipynb(s) at: philadelphia_refinery.ipynb INFO:ipypublish:with conversion configuration: latex_ipypublish_nocode INFO:nbmerge:Reading notebook INFO:ipypublish:finding conversion configuration: latex_ipypublish_nocode INFO:ipypublish:loading conversion configuration INFO:ipypublish:creating exporter INFO:ipypublish:creating template and loading filters INFO:ipypublish:creating process configuration INFO:ipypublish:running nbconvert INFO:root:adding ipub defaults to notebook INFO:root:splitting outputs into separate cells INFO:resolve_links:resolving external file paths in ipub metadata to: philadelphia_refinery.ipynb INFO:captions:extracting caption cells ERROR:nbpublish:Run Failed: The 'ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.8"' distribution was not found and is required by ruamel.yaml

Conda Environment File

philadelphia_refinery.txt

chrisjsewell commented 5 years ago

Thanks for the report @lightsquared. This occurs because in ruamel.yaml v0.16 they "split off C source that generates .so file to ruamel.yaml.clib". Therefore, if you either conda install "ruamel.yaml<0.16" or pip install ruamel.yaml.clib (since it is not currently available on conda), this should fix the issue.

I have logged an issue upstream to see about fixing this: conda-forge/ruamel.yaml-feedstock#116

chrisjsewell commented 5 years ago

For now, I have pinned ruamel.yaml<0.16 in the conda distribution (0.10.8-pyXX_1)

lightsquared commented 5 years ago

The pip install ruamel.yaml.clib fixed the issue. Thanks for the quick reply. Your library completely changes the way I use jupyter notebook. Thanks so much.