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

No module named pip in conda build #2827

Closed
cdeil opened this Issue May 8, 2017 · 7 comments

Comments

Projects
None yet
3 participants
@cdeil

cdeil commented May 8, 2017

Details

Expected Result

Successful build

Actual Result

Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/gammapy/conda/latest/bin/pip", line 4, in <module>
    import pip
ImportError: No module named 'pip'

This seems to be another case like #2784 (which was resolved and closed without an explanation what the issue was or how it was fixed).

My current environment.yml is this:

name: gammapy-rtd

channels:
  - conda-forge
  - astropy

dependencies:
  - python=3.5
  - cython
  - numpy
  - uncertainties
  - sphinx
  - scipy
  - scikit-image
  - matplotlib
  - astropy
  - regions
  - reproject
  - aplpy

Anyone know why this is happening?
Is this a fluke or can someone reproduce the issue?

Should I try to wipe?
Does one always have to manually list pip?
(it's not mentioned here: http://docs.readthedocs.io/en/latest/conda.html and wasn't necessary before).

@cdeil

This comment has been minimized.

cdeil commented May 20, 2017

I'm still getting the same error and need help to resolve this.

This is the full build log from here:
https://readthedocs.org/projects/gammapy/builds/5448862/

conda env create --name latest --file /home/docs/checkouts/readthedocs.org/user_builds/gammapy/checkouts/latest/docs/environment.yml
conda install --yes --name latest sphinx==1.3.5 Pygments==2.2.0 docutils==0.12 mock pillow>=3.0.0 sphinx_rtd_theme==0.1.7 alabaster>=0.7,<0.8,!=0.7.5
python /home/docs/checkouts/readthedocs.org/user_builds/gammapy/conda/latest/bin/pip install -U --cache-dir /home/docs/checkouts/readthedocs.org/user_builds/gammapy/.cache/pip mkdocs==0.15.0 readthedocs-sphinx-ext<0.6 commonmark==0.5.4 recommonmark==0.1.1
Traceback (most recent call last):
  File "/home/docs/checkouts/readthedocs.org/user_builds/gammapy/conda/latest/bin/pip", line 4, in <module>
    import pip
ImportError: No module named 'pip'

The current docs/environment.yml file in our repo is here:
https://github.com/gammapy/gammapy/blob/f0ce8e5d88fbb8c7f3f65271f061574967305480/docs/environment.yml
Note that it has name: gammapy-rtd (not name: latest like in the build log) and contains

dependencies:
  - python=3.5
  - pip

(i.e. I tried to list the missing pip when I first saw the error).

Our top-level readthedocs.yml looks like this:
https://github.com/gammapy/gammapy/blob/f0ce8e5d88fbb8c7f3f65271f061574967305480/readthedocs.yml

# See http://read-the-docs.readthedocs.io/en/latest/yaml-config.html
conda:
    file: docs/environment.yml

python:
   version: 3.5
   setup_py_install: true

Something is wrong, RTD is not building according to our docs/environment.yml, right?
What do I have to change?

@cdeil

This comment has been minimized.

cdeil commented May 28, 2017

Following the advice of @humitos in #2584 (comment) I tried to reproduce the pip issue locally by running the following commands:

git clone https://github.com/gammapy/gammapy.git
cd gammapy
conda env create -f docs/environment.yml
/Users/deil/software/anaconda/envs/gammapy-rtd/bin/pip install mkdocs==0.15.0 readthedocs-sphinx-ext<0.6 commonmark==0.5.4 recommonmark==0.1.1

I get a different error, because the "<" sign in "readthedocs-sphinx-ext<0.6" isn't quoted:

$ /Users/deil/software/anaconda/envs/gammapy-rtd/bin/pip install mkdocs==0.15.0 readthedocs-sphinx-ext<0.6 commonmark==0.5.4 recommonmark==0.1.1
-bash: 0.6: No such file or directory

If I add it, it works, i.e. I'm not able to reproduce the error from RTD locally:

$ /Users/deil/software/anaconda/envs/gammapy-rtd/bin/pip install mkdocs==0.15.0 "readthedocs-sphinx-ext<0.6" commonmark==0.5.4 recommonmark==0.1.1
Requirement already satisfied: mkdocs==0.15.0 in /Users/deil/software/anaconda/envs/gammapy-rtd/lib/python3.5/site-packages
Requirement already satisfied: readthedocs-sphinx-ext<0.6 in /Users/deil/software/anaconda/envs/gammapy-rtd/lib/python3.5/site-packages
Requirement already satisfied: commonmark==0.5.4 in /Users/deil/software/anaconda/envs/gammapy-rtd/lib/python3.5/site-packages
Requirement already satisfied: recommonmark==0.1.1 in /Users/deil/software/anaconda/envs/gammapy-rtd/lib/python3.5/site-packages
Requirement already satisfied: tornado>=4.1 in /Users/deil/software/anaconda/envs/gammapy-rtd/lib/python3.5/site-packages (from mkdocs==0.15.0)
Requirement already satisfied: mkdocs-bootswatch>=0.1.0 in /Users/deil/software/anaconda/envs/gammapy-rtd/lib/python3.5/site-packages (from mkdocs==0.15.0)
Requirement already satisfied: PyYAML>=3.10 in /Users/deil/software/anaconda/envs/gammapy-rtd/lib/python3.5/site-packages (from mkdocs==0.15.0)
Requirement already satisfied: livereload>=2.3.2 in /Users/deil/software/anaconda/envs/gammapy-rtd/lib/python3.5/site-packages (from mkdocs==0.15.0)
Requirement already satisfied: Markdown>=2.3.1 in /Users/deil/software/anaconda/envs/gammapy-rtd/lib/python3.5/site-packages (from mkdocs==0.15.0)
Requirement already satisfied: click>=4.0 in /Users/deil/software/anaconda/envs/gammapy-rtd/lib/python3.5/site-packages (from mkdocs==0.15.0)
Requirement already satisfied: Jinja2>=2.7.1 in /Users/deil/software/anaconda/envs/gammapy-rtd/lib/python3.5/site-packages (from mkdocs==0.15.0)
Requirement already satisfied: mkdocs-bootstrap>=0.1.1 in /Users/deil/software/anaconda/envs/gammapy-rtd/lib/python3.5/site-packages (from mkdocs==0.15.0)
Requirement already satisfied: requests in /Users/deil/software/anaconda/envs/gammapy-rtd/lib/python3.5/site-packages (from readthedocs-sphinx-ext<0.6)
Requirement already satisfied: nilsimsa>=0.3.7 in /Users/deil/software/anaconda/envs/gammapy-rtd/lib/python3.5/site-packages (from readthedocs-sphinx-ext<0.6)
Requirement already satisfied: docutils>=0.11 in /Users/deil/software/anaconda/envs/gammapy-rtd/lib/python3.5/site-packages (from recommonmark==0.1.1)
Requirement already satisfied: six in /Users/deil/software/anaconda/envs/gammapy-rtd/lib/python3.5/site-packages (from livereload>=2.3.2->mkdocs==0.15.0)
Requirement already satisfied: MarkupSafe>=0.23 in /Users/deil/software/anaconda/envs/gammapy-rtd/lib/python3.5/site-packages (from Jinja2>=2.7.1->mkdocs==0.15.0)
@cdeil

This comment has been minimized.

cdeil commented Jun 15, 2017

We're still stuck with this issue, our docs haven't updated since 6 weeks.

@humitos - Is #2876 deployed yet? Any tip what to resolve this conda / pip issue?

@cdeil

This comment has been minimized.

cdeil commented Jun 15, 2017

I tried something: gammapy/gammapy@751bab6
but it's still failing because of no pip (and apparently using Python 2.7):
https://readthedocs.org/projects/gammapy/builds/5566748/
in a way I don't understand or know how to fix.

@cdeil

This comment has been minimized.

cdeil commented Jan 9, 2018

I'm closing this issue. Since no-one else chimed in here, it doesn't look like this is an issue that other projects have. For Gammapy, at the moment the issue isn't there any more, we have a build timeout (see #3360).

@RichardLitt

This comment has been minimized.

Member

RichardLitt commented Jan 11, 2018

Thank you, @cdeil, for logging and for self-moderating this issue. Apologies that none of us got back to you in a timely fashion!

@humitos

This comment has been minimized.

Member

humitos commented Jan 15, 2018

@humitos - Is #2876 deployed yet? Any tip what to resolve this conda / pip issue?

I'm sorry. I completely lost this notification. Nice to know you could solve the original issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment