Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#64029 closed defect (fixed)

py37-astropy @5.0 fails import

Reported by: odysseus9672 (Sean Lake) Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: py-astropy

Description (last modified by odysseus9672 (Sean Lake))

The recent update to astropy 5.0 for py37-astropy doesn't work. It's missing a dependency, perhaps? When I try to use it I get an error.

This is on MacPorts 2.7.1 with XCode 11.5 on Mac OS X 10.15.7.

Here's the output:

Traceback (most recent call last):
  File "./Analysis_Pix_v7.py", line 96, in <module>
    import astropy.io.ascii as aptxt
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/astropy/__init__.py", line 42, in <module>
    from . import config as _config  # noqa: E402
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/astropy/config/__init__.py", line 10, in <module>
    from .configuration import *
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/astropy/config/configuration.py", line 24, in <module>
    from astropy.utils import find_current_module, silence
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/astropy/utils/__init__.py", line 17, in <module>
    from .codegen import *  # noqa
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/astropy/utils/codegen.py", line 13, in <module>
    from .introspection import find_current_module
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/astropy/utils/introspection.py", line 11, in <module>
    from importlib import metadata
ImportError: cannot import name 'metadata' from 'importlib' (/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py)

Attachments (1)

main.log (123.9 KB) - added by odysseus9672 (Sean Lake) 2 years ago.
Build log for py37-astropy

Download all attachments as: .zip

Change History (12)

comment:1 Changed 2 years ago by odysseus9672 (Sean Lake)

Description: modified (diff)
Summary: py38-astropy @5.0 fails importpy37-astropy @5.0 fails import

comment:2 Changed 2 years ago by reneeotten (Renee Otten)

Owner: set to Schamschula
Port: py-astropy added
Status: newassigned

comment:3 Changed 2 years ago by Schamschula (Marius Schamschula)

I don't see this error with py39-astropy.

On further research, I find that Python 3.8 is now the minimum version supported by astropy 5.0.

comment:4 Changed 2 years ago by Schamschula (Marius Schamschula)

I can pin py37-astropy to version 4.3.1.

comment:6 Changed 2 years ago by reneeotten (Renee Otten)

Resolution: fixed
Status: assignedclosed

assuming that it did.... @odysseus9672 please give it a try and if you're still having issues feel free to reopen this ticket.

comment:7 Changed 2 years ago by odysseus9672 (Sean Lake)

So, I still see this error when I attempt to import astropy in python 3.7. So, the pinning of py37-astropy to version 4.3.1 hasn't made it to my port tree and the fixes that help 3.8+ don't help. So, no, this isn't fixed.

comment:8 Changed 2 years ago by Schamschula (Marius Schamschula)

Thanks for that info! I'll pin the older version for python 3.7.

Last edited 2 years ago by Schamschula (Marius Schamschula) (previous) (diff)

comment:9 Changed 2 years ago by odysseus9672 (Sean Lake)

Thanks! It looks like one more thing needs to be done for the version pinning to work. When I uninstall py37-astropy to get rid of 5.0 and then attempt to reinstall to get 4.3.1, I get the following error:

--->  Computing dependencies for py37-astropy
--->  Fetching archive for py37-astropy
--->  Attempting to fetch py37-astropy-4.3.1_1.darwin_19.x86_64.tbz2 from https://packages.macports.org/py37-astropy
--->  Attempting to fetch py37-astropy-4.3.1_1.darwin_19.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/py37-astropy
--->  Attempting to fetch py37-astropy-4.3.1_1.darwin_19.x86_64.tbz2 from https://kmq.jp.packages.macports.org/py37-astropy
--->  Fetching distfiles for py37-astropy
--->  Attempting to fetch astropy-5.0.tar.gz from https://files.pythonhosted.org/packages/source/a/astropy
--->  Verifying checksums for py37-astropy
Error: Checksum (rmd160) mismatch for astropy-5.0.tar.gz
Error: Checksum (sha256) mismatch for astropy-5.0.tar.gz
Error: Checksum (size) mismatch for astropy-5.0.tar.gz
Error: Failed to checksum py37-astropy: Unable to verify file checksums
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_python_py-astropy/py37-astropy/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there
is a bug.
Error: Processing of port py37-astropy failed

comment:10 Changed 2 years ago by Schamschula (Marius Schamschula)

Why is it fetching the source code for version 5.0?

It doesn't make sense. It attempted to fetch the binaries for version 4.3.1.

Can you attach the log file? Actually, a log file with debug mode (i.e. sudo port install -d py37-astropy) might be more useful.

comment:11 Changed 2 years ago by Schamschula (Marius Schamschula)

In d85499e3db4feac909e466d2e4d6c4378db42e0a/macports-ports (master):

py-astropy: add distname and dist_subdir for py37 subport

Closes: #64302
See: #64029

Changed 2 years ago by odysseus9672 (Sean Lake)

Attachment: main.log added

Build log for py37-astropy

Note: See TracTickets for help on using tickets.