Skip to content

Downstream cloud install failing (setup.py install does not install astropy wheel) #10752

Closed

Description

@vvasuki

Description

When trying to test install our package, which depends on astropy using this github actions workflow, installation of astropy (and no other package) bombs. (We've had no problem installing on our desktop.)

Relevant lines from the workflow config linked above:

    - name: Build package
      run: |
        python setup.py install

Note the dependency on astropy here.

Wonder what I am doing wrong (if anything). Thanks for the package - guidance much appreciated.

Expected behavior

astropy dependency should be smoothly installed just like other packages.

Actual behavior

astropy installation bombs.

Full logs are here. Most relevant snippet below:

Installed /opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/site-packages/extension_helpers-0.1-py3.6.egg
Searching for astropy
Reading https://pypi.org/simple/astropy/
Downloading https://files.pythonhosted.org/packages/ab/a9/778dc3236dcb85334dbd9fa6832a354fdeede76def0215ae29dd4ab284a3/astropy-4.1rc2.tar.gz#sha256=162b2e222d05523c67fab95fc34fbef881c9271ee01b171efa1b895eaaa28adb
Best match: astropy 4.1rc2
Processing astropy-4.1rc2.tar.gz
Writing /tmp/easy_install-nrw21auq/astropy-4.1rc2/setup.cfg
Running astropy-4.1rc2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-nrw21auq/astropy-4.1rc2/egg-dist-tmp-gnbsrj3r
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/site-packages/setuptools/sandbox.py", line 154, in save_modules
    yield saved
  File "/opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/site-packages/setuptools/sandbox.py", line 195, in setup_context
    yield
  File "/opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/site-packages/setuptools/sandbox.py", line 250, in run_setup
    _execfile(setup_script, ns)
  File "/opt/hostedtoolcache/Python/3.6.12/x64/lib/python3.6/site-packages/setuptools/sandbox.py", line 45, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-nrw21auq/astropy-4.1rc2/setup.py", line 102, in <module>
    # need to place data files outside of your packages. See:
ModuleNotFoundError: No module named 'extension_helpers'

System Details

Summarized in the below lines:

  build:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: [3.6]
#         python-version: [3.5, 3.6, 3.7, 3.8]

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version }}

Activity

  1. changed the title [-]Downstream install failing[/-] [+]Downstream cloud install failing[/+] on Sep 21, 2020
  2. pllim commented on Sep 21, 2020

    @pllim
    Member

    extension_helpers is needed if somehow your job is trying to build astropy from source, but why? astropy has wheels for Python 3.6 at https://pypi.org/project/astropy/#files . Maybe @astrofrog , @eteq , or @Cadair have ideas?

  3. pllim commented on Sep 21, 2020

    @pllim
    Member

    Thanks for opening the issue with extra details!

  4. Cadair commented on Sep 21, 2020

    @Cadair
    Member

    I think the root of this issue is that you should be running python -m pip install . rather than python setup.py install. I am not 100% sure on why running python setup.py install doesn't install the wheels though.

  5. Cadair commented on Sep 21, 2020

    @Cadair
    Member

    My best guess would be that the ubuntu image doesn't have the wheel package installed by default and therefore setuptools can't use wheels when installing.

  6. pllim commented on Sep 21, 2020

    @pllim
    Member

    @Cadair , are you saying that downstream packages need to move to using pyproject.toml too if they depend on astropy?

  7. vvasuki commented on Sep 21, 2020

    @vvasuki
    Author

    Pre-Installing the latest version off github with the below:

        - name: Install dependencies
          run: |
            python -m pip install --upgrade pip
            python -m pip install git+https://github.com/astropy/astropy@master -U
    

    worked!

    See "Install dependencies" and "Build test" steps in https://github.com/sanskrit-coders/jyotisha/runs/1144269434?check_suite_focus=true , relevant excerpts below:

    Collecting git+https://github.com/astropy/astropy@master
      Cloning https://github.com/astropy/astropy (to revision master) to /tmp/pip-req-build-5bsx23mm
      Installing build dependencies: started
      Installing build dependencies: finished with status 'done'
      Getting requirements to build wheel: started
      Getting requirements to build wheel: finished with status 'done'
        Preparing wheel metadata: started
        Preparing wheel metadata: finished with status 'done'
    Collecting pyerfa
      Downloading pyerfa-1.7.0-cp36-cp36m-manylinux2010_x86_64.whl (693 kB)
    Collecting numpy>=1.17
      Downloading numpy-1.19.2-cp36-cp36m-manylinux2010_x86_64.whl (14.5 MB)
    Building wheels for collected packages: astropy
      Building wheel for astropy (PEP 517): started
      Building wheel for astropy (PEP 517): still running...
      Building wheel for astropy (PEP 517): finished with status 'done'
      Created wheel for astropy: filename=astropy-4.2.dev700+g79f416915-cp36-cp36m-linux_x86_64.whl size=9835206 sha256=e2a0be0da85764a4517174f09533e064adb594bf2dacbb578562e49753c969b2
      Stored in directory: /tmp/pip-ephem-wheel-cache-7kuarze3/wheels/6b/d5/22/579daa298bb503dfae250fa40461d75acf1588e22d79b5b1e1
    Successfully built astropy
    Installing collected packages: numpy, pyerfa, astropy
    Successfully installed astropy-4.2.dev700+g79f416915 numpy-1.19.2 pyerfa-1.7.0
    
  8. vvasuki commented on Sep 21, 2020

    @vvasuki
    Author

    root of this issue is that you should be running python -m pip install . rather than python setup.py install.

    This worked as well! ( https://github.com/sanskrit-coders/jyotisha/runs/1144353354?check_suite_focus=true ) Thanks very much for the quick guidance!

    I am not 100% sure on why running python setup.py install doesn't install the wheels though.

    (Leaving this open in case you'd like to discuss/ solve this part.)

  9. changed the title [-]Downstream cloud install failing[/-] [+]Downstream cloud install failing (setup.py install does not install astropy wheel)[/+] on Sep 21, 2020
  10. Cadair commented on Sep 22, 2020

    @Cadair
    Member

    @Cadair , are you saying that downstream packages need to move to using pyproject.toml too if they depend on astropy?

    No, but it's not recommended to install package by invoking setup.py any more. The correct way to do it is always pip. Even if your package doesn't use PEP 517/8 then one you depend on might and you need pip to successfully install them...

    I am not 100% sure on why running python setup.py install doesn't install the wheels though.

    To my mind this is a non-question, it doesn't work but you shouldn't really be using it. We should make sure that nowhere in our docs we are recommending anyone use setup.py xxx to install or otherwise though.

  11. pllim commented on Sep 22, 2020

    @pllim
    Member

    I opened #10756 to address #10752 (comment) . But given that @vvasuki has found a working solution, I agree that there is no much point in pursuing the remaining question. Thank you, all!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions