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

New builds crashing at conda environment.yml install phase #5387

Closed
chrisjsewell opened this issue Mar 3, 2019 · 8 comments
Closed

New builds crashing at conda environment.yml install phase #5387

chrisjsewell opened this issue Mar 3, 2019 · 8 comments
Labels
Support Support question

Comments

@chrisjsewell
Copy link
Contributor

Details

Expected Result

Successful install of Conda dependencies from environment.yaml

Actual Result

All builds from the last few days fail with:

[rtd-command-info] start-time: 2019-02-28T02:27:14.102739Z, end-time: 2019-02-28T02:29:38.601383Z, duration: 144, exit-code: 247
conda env create --quiet --name latest --file /home/docs/checkouts/readthedocs.org/user_builds/ipypublish/checkouts/latest/docs/environment.yaml
Solving environment: ...working...

There has been on change in the conda dependencies from the last successful build,
so I assume something has changed on the conda/rtd end?

From this related issues #5098, it looks like I may need to ask you to increase the memory limit?

@stsewd stsewd added the Support Support question label Mar 3, 2019
@stsewd
Copy link
Member

stsewd commented Mar 3, 2019

Looks like a missing dependency

ModuleNotFoundError: No module named 'matplotlib'

@chrisjsewell
Copy link
Contributor Author

@stsewd thanks for the quick reply.

That is only in the most recent Build #8690163 (just created),
where I try using system_packages: true for the matplotlib and pandas dependencies.
Am I writing the configuration file wrong?

version: 2

conda:
  environment: docs/environment.yaml

python:
  version: 3.6
  install:
    - method: pip
      path: .
  system_packages: true

@stsewd
Copy link
Member

stsewd commented Mar 3, 2019

Maybe they are interfering from the packages in the docker image, can you remove the system_packages option (default is false and looks like you don't need that option)?

@chrisjsewell
Copy link
Contributor Author

chrisjsewell commented Mar 3, 2019

ok fixed by moving all but the non-python (pandoc) dependency to an extras_requirement:

.readthedocs.yml:

version: 2

conda:
  environment: docs/environment.yaml

python:
  version: 3.6
  install:
    - method: pip
      path: .
      extra_requirements:
          - rtd

docs/environment.yaml:

channels:
  - conda-forge
dependencies:
  - python =3.6
  - pandoc

Two things I noted are:

  1. Despite setting the python version in the .readthedocs.yml,
    it still builds a python 3.7 environment, unless I set python in the environment.yaml
    (see Build #8690221)
  2. In Build #8690254,
    I again tried to use system_packages: true (instead of pip installing matplotlib),
    but again, it did not find it. Perhaps that mechanism is broken?

@chrisjsewell
Copy link
Contributor Author

chrisjsewell commented Mar 3, 2019

and obviously, in the future, it might cut down on issues like this being raised, if there was a better error message. But I'll leave that up to you guys :) Cheers

@stsewd
Copy link
Member

stsewd commented Mar 3, 2019

Despite setting the python version in the .readthedocs.yml,
it still builds a python 3.7 environment, unless I set python in the environment.yaml
(see Build #8690221)

Conda is in charge of managing the python version when using conda. We can add a note about this in the docs.

In Build #8690254,
I again tried to use system_packages: true (instead of pip installing matplotlib),
but again, it did not find it. Perhaps that mechanism is broken?

oh, now I get it, that option only works for no-conda projects, because we use that option when we create the virtual environment, the environment creation is delegated to conda when the user uses conda.

@chrisjsewell
Copy link
Contributor Author

the environment creation is delegated to conda

Ah, I see, no problem. Yeh just a few extra notes in the documentation would be good,
and a warning that RTD can't handle building too big conda environments

@chrisjsewell
Copy link
Contributor Author

chrisjsewell commented Mar 3, 2019

Actually I see now, there is already documentation to this effect: https://docs.readthedocs.io/en/latest/guides/build-using-too-many-resources.html#use-pip-when-possible,
I was just too lazy to read the full instructions lol. Maybe just add a seealso or extra warning here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Support question
Projects
None yet
Development

No branches or pull requests

2 participants