Skip to content

Missing dependency for sphinxcontrib-spelling #21396

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

Closed
datapythonista opened this issue Jun 8, 2018 · 10 comments · Fixed by #21397
Closed

Missing dependency for sphinxcontrib-spelling #21396

datapythonista opened this issue Jun 8, 2018 · 10 comments · Fixed by #21397
Labels
Bug Build Library building on various platforms Docs
Milestone

Comments

@datapythonista
Copy link
Member

datapythonista commented Jun 8, 2018

(pandas-dev) [mgarcia@xps doc]$ python make.py --num-jobs=8
Running Sphinx v1.7.5

Extension error:
Could not import extension sphinxcontrib.spelling (exception: No module named 'sphinxcontrib.spelling')

Problem description

In #21109 the package sphinxcontrib-spelling has been added to the sphinx configuration, but the package has not been included in the conda or pip dependencies. This is making the documentation script crash.

@datapythonista
Copy link
Member Author

Seems like sphinxcontrib-spelling is available in conda and pip, but it requires pyenchant which is not available in the main channels of conda. Also, the versions I found seem to be conflicting with pyarrow.

@FabioRosado can you please provide more information on which dependencies you installed (which versions) and from which channels?

@FabioRosado
Copy link
Contributor

Hello @datapythonista, I forgot to add the requirements on the txt file my apologies.
I don't use conda so when I installed the sphinx extension all I did was pip install sphinxcontrib-spelling and everything worked fine, I got no conflicts with pyarrow when I tried to install the library.

As for pyenchant not being available in the main channels of conda, I tried running the spelling extension without pyenchant installed and everything worked fine - which is odd since the documentation says it uses pyenchant to produce a report showing misspelt words. Perhaps if pyenchant is not installed the extension will just write the misspelt words on a text file?

@datapythonista
Copy link
Member Author

Thanks for the info @FabioRosado, and no worries for the missing requirements. It was a cool and complex PR, easy to forget some detail.

I'd say that you had already pyenchant installed, or that pip installs it when installing sphinxcontrib-spelling. I'm using conda and I get:

(pandas-dev) [mgarcia@xps doc]$ python make.py --num-jobs=8
Running Sphinx v1.7.5

Extension error:
Could not import extension sphinxcontrib.spelling (exception: No module named 'enchant')

@FabioRosado
Copy link
Contributor

Yeah my bad I forgot to activate the virtualenv that's why it wasn't showing on my pip list haha

I don't use conda so I'm not sure if there is a workaround this issue. It seems you can download the pyenchant file, could this be a possible solution? Also, not sure if it matters but pyenchant is now unmaintained

@jorisvandenbossche
Copy link
Member

Yes, I had this problem yesterday as well. The conda-forge package is kind of broken as it does not install the needed dependencies. But it also seems that pyenchant is no longer maintainted.

@jorisvandenbossche
Copy link
Member

Given the install problems, maybe we should make the package optional? (so in conf.py try to import it, and only if it is importable, add it to the list of extensions?)

@jorisvandenbossche
Copy link
Member

BTW, this also broke our travis doc build, since it is of course needed there as well.

@jreback
Copy link
Contributor

jreback commented Jun 9, 2018

let’s revert this for now
leave the actual spelling fixes of course

@jorisvandenbossche
Copy link
Member

No need to revert I think, we can leave the python make.py spelling there, for if you have it installed. Just need a try except in conf.py

@FabioRosado
Copy link
Contributor

I will start working on Part 2 of this PR so I'll add the try there if its alright with everyone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Build Library building on various platforms Docs
Projects
None yet
5 participants