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

fix dependencies with numpy 1.23 #28

Closed
wasndas opened this issue Jun 28, 2022 · 2 comments
Closed

fix dependencies with numpy 1.23 #28

wasndas opened this issue Jun 28, 2022 · 2 comments
Assignees
Labels
bug Something isn't working dependencies Pull requests that update a dependency file

Comments

@wasndas
Copy link

wasndas commented Jun 28, 2022

basecam limits astropy to < 5.0 which is incompatible with numpy 1.23.0 see astropy issue #12535, has been fixed with astropy > 5.0

ERROR: sdss-basecam 0.6.2 has requirement astropy<5.0,>=4.2; python_version >= "3.7" and python_version < "3.10", but you'll have astropy 5.1 which is incompatible.

In the current dependencies the latest numpy 1.23.0 is installed with astropy 4.3.1 and it fails.

[ERROR]: Traceback (most recent call last):
  File "/root/lvmcam/python/lvmcam/__main__.py", line 26, in <module>
    from lvmcam.actor.actor import LvmcamActor
  File "/root/lvmcam/python/lvmcam/actor/__init__.py", line 1, in <module>
    from .actor import LvmcamActor
  File "/root/lvmcam/python/lvmcam/actor/actor.py", line 21, in <module>
    from basecam import BaseCamera
  File "/usr/local/lib/python3.8/dist-packages/basecam/__init__.py", line 12, in <module>
    from .camera import *
  File "/usr/local/lib/python3.8/dist-packages/basecam/camera.py", line 38, in <module>
    from basecam.models.fits import FITSModel
  File "/usr/local/lib/python3.8/dist-packages/basecam/models/__init__.py", line 1, in <module>
    from .builtin import *
  File "/usr/local/lib/python3.8/dist-packages/basecam/models/builtin.py", line 9, in <module>
    from .card import Card
  File "/usr/local/lib/python3.8/dist-packages/basecam/models/card.py", line 20, in <module>
    import astropy.wcs
  File "/usr/local/lib/python3.8/dist-packages/astropy/wcs/__init__.py", line 26, in <module>
    from .wcs import *
  File "/usr/local/lib/python3.8/dist-packages/astropy/wcs/wcs.py", line 50, in <module>
    from astropy import units as u
  File "/usr/local/lib/python3.8/dist-packages/astropy/units/__init__.py", line 17, in <module>
    from .quantity import *
  File "/usr/local/lib/python3.8/dist-packages/astropy/units/quantity.py", line 28, in <module>
    from .quantity_helper import (converters_and_unit, can_have_arbitrary_unit,
  File "/usr/local/lib/python3.8/dist-packages/astropy/units/quantity_helper/__init__.py", line 10, in <module>
    from . import helpers, function_helpers
  File "/usr/local/lib/python3.8/dist-packages/astropy/units/quantity_helper/function_helpers.py", line 119, in <module>
    np.asscalar,
  File "/usr/local/lib/python3.8/dist-packages/numpy/__init__.py", line 311, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'asscalar'
@wasndas wasndas added bug Something isn't working dependencies Pull requests that update a dependency file labels Jun 28, 2022
@wasndas wasndas changed the title fix compatibility with numpy 1.23 fix dependencies with numpy 1.23 Jun 28, 2022
@albireox
Copy link
Member

Fixed on 8f1afb2. Restricted numpy to <1.22.0. The issue seems to be that numpy 1.23 has deprecated numpy.asscalar which is used by astropy 4.0.

Eventually we should just move to astropy 5 but the problem is that we are supporting Python 3.7 and astropy 5 does not have wheels for Python 3.7 (and I'm not sure it actually compiles).

I've release 0.6.3 with that change, let me know if that works.

@wasndas
Copy link
Author

wasndas commented Jun 30, 2022

... did work. You dont have to pin astropy to 4.3 for python > 3.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants