Readthedocs.org: Package mkdocs not found in conda

Created on 27 Jun 2017  路  16Comments  路  Source: readthedocs/readthedocs.org

Details

Expected Result

The build should pass

Actual Result

The second step failed with:

conda install --yes --name latest sphinx mock pillow sphinx_rtd_theme mkdocs
Fetching package metadata .........


PackageNotFoundError: Package not found: '' Package missing in current linux-64 channels: 
  - mkdocs

You can search for packages on anaconda.org with

    anaconda search -t conda mkdocs

You may need to install the anaconda-client command line client with

    conda install anaconda-client

The last successful build was Completed June 23, 2017. 8:48 a.m

Bug

All 16 comments

@agjohnson @ericholscher I'm noticing the same thing on Jupyter builds using conda.

OK. Any suggestions? As I always note, we don't have any core devs who use conda, so we need help diagnosing and fixing these issues.

@ericholscher - Would that be possible though that, based on the chosen documentation type, either only sphinx or mkdocs is installed? We use sphinx, and also test on travis whether the docs building is working.

So overall it would be great if the same, or a very similar env we test for could be used on RTD itself.

@ericholscher I will try to take a look tomorrow.

Not sure what changed on the RTD side, but the problem is that mkdocs is not available on the standard conda channels, only on conda-forge.

So the line that failed should either be:

conda install -c conda-forge  --yes --name latest sphinx mock pillow sphinx_rtd_theme mkdocs

or

conda install --yes --name latest sphinx mock pillow sphinx_rtd_theme 
pip install mkdocs

On the package-author side you might be able to fix it immediately by adding a channel list to the top of your environment file and adding mkdocs to your list of depends.

As mentioned by @mwcraig (thanks!), adding mkdocs to the environment.yml and installing from the conda-forge channel does allow the docs to build as expected. For those that are not using mkdocs, which we are not with Jupyter, I needed to add the mkdocs package for installation to the dependencies in the environment.yml. See example file.

thanks @mwcraig, I did add mkdocs as a dependency and the error is now gone.

I'm curious why this started breaking though - was there a specific change to RTD that was made around the date/time I indicated? RTD used not to install mkdocs?

@astrofrog I think the change made here introduced mkdocs install from conda default channel. I have no idea why it surfaced recently.

Maybe there is a slight delay in deployment after merging a PR?

@bsipocz We did a deploy June 8th that should have had the linked change around conda dependencies. We did do a deploy the other day, I don't know what would have changed since then though.

I agree that we should probably be removing the unneeded mkdocs/sphinx dependencies from the pip/conda install step. If anyone wants to submit a patch for this, it should be relatively easy to change and test -- code is here: https://github.com/rtfd/readthedocs.org/blob/rel/readthedocs/doc_builder/python_environments.py#L213-L219 and there is also the vanilla pip install above, which would be good to replicate this logic in.

This fix should be deployed.

Confirming that #2978 resolved this issue. Longer term, #2979 is a better solution and more robust.

Successful build after #2978 merge: https://readthedocs.org/projects/jupyter-notebook/builds/5622632/

Thanks @ericholscher 馃憤

Thanks to @willingc & @bsipocz for the patchs!

I can confirm that the astropy build is passing again, too. Thanks!

I'll try to finish up #2979 tomorrow.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

humitos picture humitos  路  3Comments

pllim picture pllim  路  3Comments

cagataycali picture cagataycali  路  4Comments

JiaweiZhuang picture JiaweiZhuang  路  3Comments

adamjstewart picture adamjstewart  路  4Comments