mattyowl/astLib

Need a ".whl" to install.

Opened this issue · 5 comments

Hello, I'm trying to install the library, but I can't. The 'pip' installation in python 3.11 cannot build the wheel for the library. But I'm sure I can install the module with a '.whl' file.

I guess this is to do with the distutils -> setuptools switch that's needed for python 3.11 - I've been working on that in the 'dev' branch. Perhaps if you try 'pip install -e .' for the dev branch it might work? Sorry, I haven't made a new release on PyPI with these changes in yet. Which platform / OS are you using?

I've made a new release that's now on PyPI (v0.11.9) - hopefully this should fix this issue.

Also on python 3.10. It's a blocker because we're trying to build Docker images that have some software that have astLib as a requirement.

Failed to build astLib
49.05 ERROR: Could not build wheels for astLib, which is required to install pyproject.toml-based projects

It seems to be a problem with gcc not finding the right files:

47.39   Building wheel for astLib (pyproject.toml): started
47.59   Building wheel for astLib (pyproject.toml): finished with status 'error'
47.60   error: subprocess-exited-with-error
47.60   
47.60   × Building wheel for astLib (pyproject.toml) did not run successfully.
47.60   │ exit code: 1
47.60   ╰─> [25 lines of output]
47.60       <string>:8: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
47.60       running bdist_wheel
47.60       running build
47.60       running build_py
47.60       creating build
47.60       creating build/lib.linux-x86_64-cpython-310
47.60       creating build/lib.linux-x86_64-cpython-310/astLib
47.60       copying astLib/__init__.py -> build/lib.linux-x86_64-cpython-310/astLib
47.60       copying astLib/astPlots.py -> build/lib.linux-x86_64-cpython-310/astLib
47.60       copying astLib/astCalc.py -> build/lib.linux-x86_64-cpython-310/astLib
47.60       copying astLib/astStats.py -> build/lib.linux-x86_64-cpython-310/astLib
47.60       copying astLib/astCoords.py -> build/lib.linux-x86_64-cpython-310/astLib
47.60       copying astLib/astWCS.py -> build/lib.linux-x86_64-cpython-310/astLib
47.60       copying astLib/astSED.py -> build/lib.linux-x86_64-cpython-310/astLib
47.60       copying astLib/astImages.py -> build/lib.linux-x86_64-cpython-310/astLib
47.60       creating build/lib.linux-x86_64-cpython-310/PyWCSTools
47.60       copying PyWCSTools/wcs.py -> build/lib.linux-x86_64-cpython-310/PyWCSTools
47.60       copying PyWCSTools/__init__.py -> build/lib.linux-x86_64-cpython-310/PyWCSTools
47.60       copying PyWCSTools/wcscon.py -> build/lib.linux-x86_64-cpython-310/PyWCSTools
47.60       creating build/lib.linux-x86_64-cpython-310/astLib/data
47.60       copying astLib/data/bohlin2006_Vega.sed -> build/lib.linux-x86_64-cpython-310/astLib/data
47.60       copying astLib/data/sun_reference_stis_001.ascii -> build/lib.linux-x86_64-cpython-310/astLib/data
47.60       running build_ext
47.60       "gcc -pthread" -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -fPIC -c worldpos.c -o worldpos.o
47.60       error: command 'gcc -pthread' failed: No such file or directory
47.60       [end of output]
47.60   
47.60   note: This error originates from a subprocess, and is likely not a problem with pip.
47.60   ERROR: Failed building wheel for astLib

Ok - I'm not having this problem (running Ubuntu variant with Python 3.10.12) - what platform / OS are you using?

Try building this Dockerfile:

FROM python:3.10.8


RUN apt-get update && \
    apt-get install -y vim less git htop feh build-essential wget && \
    rm -rf /var/lib/apt/lists/*


WORKDIR /dsa/code

COPY requirements.txt .

RUN pip install -r requirements.txt

With this requirements.txt:

quartical
astropy
numpy<1.24.0
scipy
astLib
python-casacore
future
astro-kittens
matplotlib
jupyter

docker --version is Docker version 24.0.6, build ed223bc