Search code examples
pythonpipcondapython-wheelastropy

ERROR: failed building wheel when installing spectral-cube (astropy)


I'm trying to install the package spectral-cube from the astropy project using pip (22.0.4). I get a long error which ends with this:

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for casa-formats-io. Failed to build casa-formats-io. ERROR: Could not build wheels for casa-formats-io, which is required to install pyproject.toml-based projects

Even after downloading casa-formats-io from their github I still get this error. I've also tried installing this using conda, but the error is the same. I'm using MacOS 12.3. But I had the problem with older versions. I'm kind of confused as to what I can do. Thanks for the help!


Solution

  • I was able to fix my own problem. The error appeared because the package I was trying to download wasn't available/compatible with the newest python version (3.10). So, I simply uninstalled Python and downloaded an older version (3.8).

    Thanks anyways :)