Could not import extension sphinxcontrib.prettyproof?
nathanael-fijalkow opened this issue · comments
I was very happy to find out about Prettyproof, however I cannot seem to import it...
I'm new to JupyterBook, so maybe I've done something silly?
I pip installed the extension successfully, and then added it here in my _config.yml
sphinx:
extra_extensions:
- sphinxcontrib.prettyproof
I get the following error:
Extension error:
Could not import extension sphinxcontrib.prettyproof (exception: No module named 'sphinxcontrib.prettyproof')
Traceback (most recent call last):
File "/home/nathanael/.local/lib/python3.6/site-packages/sphinx/registry.py", line 409, in load_extension
mod = import_module(extname)
File "/usr/lib/python3.6/importlib/init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 994, in _gcd_import
File "", line 971, in _find_and_load
File "", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'sphinxcontrib.prettyproof'
Many thanks for your help!
Nath
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! 🎉
Hi @nathanael-fijalkow, thanks for your feedback. I've just tested this on a branch of jupyter-book and I did not run into any issues. Can you make sure pip list
includes sphinxcontrib-prettyproof
?
Let me walk you through the steps I took to build this locally in case it helps (note that I use Anaconda):
conda create -n prettyproof pip
andconda activate prettyproof
pip install sphinxcontrib-prettyproof
- install any jupyter-book document-related packages
- add
sphinxcontrib-prettyproof
underextra_extensions
:sphinx: extra_extensions: - sphinxcontrib.prettyproof
jb clean docs
andjb build docs
Another option would be to clone this repo and run pip install -e.
.
Many thanks @najuzilu for the quick and detailed reply! The import seems to work now, except that I get warnings of the form:
WARNING: Unknown directive type "proof:proof".
WARNING: Unknown directive type "proof:theorem".
Sorry for the naive questions! (I did look around but cannot figure it out...)
I need more details in order to help. How are you installing sphinxcontrib-prettyproof
? What is the content of _config.yml
? Can you give me an example of how you introduce the directives in the book?
If you have the project on Github, I can take a quick look. :-)
I also setup https://github.com/najuzilu/jupyterbook_proof_example which walks you through all the steps used to successfully build Jupyter Book with sphinxcontrib-prettyproof.
We've moved away from sphinxcontrib-prettyproof
so I'll close this issue. Please open a new issue if you have any problems installing the newly named extension @nathanael-fijalkow.