tlittenberg / lisacattools

Python module for interacting with example LISA catalogs
GNU General Public License v3.0
15 stars 7 forks source link

pip install fail because of astropy==4.2 that is incompatible with python 3.10.4 (and 3.9) #13

Closed antoinetran closed 1 year ago

antoinetran commented 2 years ago

Expected behavior:

mkdir /tmp/builder -p
cat <<EOF >/tmp/builder/Dockerfile
FROM ubuntu:22.04
RUN DEBIAN_FRONTEND=noninteractive apt-get update -y && apt-get install -y pip
RUN dpkg -l python3-pip python3
RUN pip install chainconsumer
RUN pip install lisacattools
EOF
cd /tmp/builder/
docker build .

should work

Current behavior: docker build fails with

       Downloading Cython-0.29.14.tar.gz (2.1 MB)                                                                                                                                                                                  ...
                elif isinstance(patterns, basestring) or not isinstance(patterns, collections.Iterable):
            AttributeError: module 'collections' has no attribute 'Iterable'

This is a bug of Cython 0.29.14 https://github.com/cython/cython/issues/3266, that is fixed 0.29.15.

However lisacctools has a hard-coded dependency to astropy==4.2 (see https://github.com/tlittenberg/lisacattools/blob/main/requirements.txt#L1) which in turn has a dependency to cython==0.29.14 (see https://github.com/astropy/astropy/blob/v4.2/pyproject.toml#L5 ).

Fix: It would be great to update astropy dependency, to at least 4.3 or more (https://github.com/astropy/astropy/blob/v4.3/pyproject.toml#L5 has fixed cython)

antoinetran commented 1 year ago

Hi, if possible can you test in CentOS 7 environment too? It uses python 3.8. Here is a test environment:

mkdir /tmp/builder -p
cat <<EOF >/tmp/builder/Dockerfile
FROM centos:7
RUN yum update -y && yum install centos-release-scl -y
RUN yum install rh-python38-python-pip -y
RUN yum info rh-python38-python-pip rh-python38-python 
RUN scl enable rh-python38 -- pip3 install chainconsumer
RUN scl enable rh-python38 -- pip3 install lisacattools
EOF
cd /tmp/builder/
docker build .