Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Pandoc installation missing in documentation build page #2467

Closed
inclinedadarsh opened this issue Dec 21, 2024 · 13 comments · Fixed by #2489
Closed

[BUG] Pandoc installation missing in documentation build page #2467

inclinedadarsh opened this issue Dec 21, 2024 · 13 comments · Fixed by #2489
Assignees
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@inclinedadarsh
Copy link
Contributor

Describe the issue

While following the Developer's guide for building documentation, after running the command make html, it gives the following error:

Notebook error:
PandocMissing in examples/anomaly_detection/anomaly_detection.ipynb:
Pandoc wasn't found.
Please check that pandoc is installed:
https://pandoc.org/installing.html
make: *** [Makefile:20: html] Error 2

Which suggests Pandoc is missing

Suggest a potential alternative/fix

Simply installing pandoc worked on my system.

A simple note regarding this in the Developer's guide for building documentation should work, but I believe there can be better solutions.

Additional context

I would be happy to work on this issue.

@baraline baraline added bug Something isn't working documentation Improvements or additions to documentation labels Dec 28, 2024
@baraline baraline changed the title [OTHER] Pandoc installation missing in documentation build page [BUG] Pandoc installation missing in documentation build page Dec 28, 2024
@baraline
Copy link
Member

I think a simple fix would be to add pandoc as a dependency in the developer/documentation install options in the pyproject.toml.
I'm just wondering why we never had the issue before ? @MatthewMiddlehurst do we actually use this ? I'm not seeing it in the makefile or in docs.

@inclinedadarsh
Copy link
Contributor Author

@baraline Pandoc is not a python dependency actually.

Sorry for not mentioning this in the original issue, but I had to fix it using sudo apt install pandoc.
I use Debian Bookwarm (12)

It might be just for my system, I'm not sure though.

I have mentioned the error logs in the original message, however, if you want, I can try rebuilding the docs in a different system and provide logs.

@baraline
Copy link
Member

baraline commented Dec 28, 2024

That would be great if you could, so we can know if it is OS related or not

@inclinedadarsh
Copy link
Contributor Author

So I tried following the installation and documentation build steps on a fresh installation of Ubuntu (latest stable) (on wsl2) and I got the same error:

Notebook error:
PandocMissing in examples/anomaly_detection/anomaly_detection.ipynb:
Pandoc wasn't found.
Please check that pandoc is installed:
https://pandoc.org/installing.html
make: *** [Makefile:20: html] Error 2

I ran the following commands (in order):

python3 -m venv venv
pip install --editable .[dev]
pip install --editable .[docs]
cd docs
make html

After doing a bit of research, it turns out Pandoc can be installed via apt as well as via pip
So I ran the command pip install pandoc and then I ran make html and the build was still throwing the same error.

Finally, I tried installing pandoc via apt:

sudo apt install pandoc

This resulted in a successful build, and I was able to view all the build files.

@baraline
Copy link
Member

baraline commented Jan 8, 2025

Thanks ! It would be nice to add this solution to the docs specifying the error and the resolution. Don't know how it will go on Windows tho, we'll document it when we encounter the issue I guess.

@shreyap2702
Copy link

I tried following the installation too, and it exited with the same error message:

Notebook error:
PandocMissing in examples/anomaly_detection/anomaly_detection.ipynb:
Pandoc wasn't found.
Please check that pandoc is installed:
https://pandoc.org/installing.html
make: *** [html] Error 2

System info: Mac M1 Air (MacOS Sonoma)

@inclinedadarsh
Copy link
Contributor Author

Sure @baraline

So should I proceed to add a note in the developer guide in the documentation section?

It'll be preferably in this section: https://www.aeon-toolkit.org/en/stable/developer_guide/documentation.html#documentation-build

@baraline
Copy link
Member

baraline commented Jan 8, 2025

@inclinedadarsh yes please, thank, not much free time for coding recently! 😄 You could refer to pandoc installation guide aswell (https://pandoc.org/installing.html)

@shreyap2702 do a brew install pandoc fix the issue ?

@inclinedadarsh
Copy link
Contributor Author

Sure. I'll submit a PR soon about it.

@inclinedadarsh
Copy link
Contributor Author

@aeon-actions-bot assign @inclinedadarsh

@shreyap2702
Copy link

yes, brew install pandoc fixes the issue and produces html files

@MatthewMiddlehurst
Copy link
Member

Never seen this before but I dev on Windows so its basically a different world 🙂. Happy to have a step or troubleshooting section which helps with this given that multiple people are having the issue.

@inclinedadarsh
Copy link
Contributor Author

Hello @baraline & @MatthewMiddlehurst
I have opened the PR #2489 for this.

Please review it and let me know if any other changes are required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants