Closed giswqs closed 1 year ago
Steps to reproduce the error:
conda install -c conda-forge pointpats
pip check
Hi @giswqs! The odd thing is that, I think, the package does not require opencv. It's a "soft dependency," being that one function attempts to import it, but if the package is not provided, then the function simply errors. This pattern is used elsehwere in python (such as pandas.read_excel
) and is pretty common... I will need to read up on how pip check
works in order to resolve the issue.
The opencv-contrib-python
package is listed on the requirements.txt, which is causing the issue. If you remove it from requirements.txt and check the dependency in a module and prompt users to install them if needed, that should solve the issue.
It appears that the only function using opencv is minimum_rotated_rectangle()
. Since the function already provides error handling, I think opencv-contrib-python
can be safely removed from requirements.txt. Otherwise, it will cause issues for all pysal downstream packages on conda-forge with pip check
. Also, opencv-contrib-python
is quite a large package (150MB). including such a large package as a required dependency that is only used by one function is not ideal.
I believe that this was resolved by #82.
Conda-forge now recommends adding
pip check
in the recipe. The pointpats package on the conda-forge channel failspip check
with an errorpointpats 2.2.0 requires opencv-contrib-python, which is not installed.
This is causing issues for all downstream packages that might be submitted to the conda-forge channel in the future. It appears thatopencv-contrib-python
in the setup.py, but it is not available on the conda-forge channel.https://github.com/conda-forge/pointpats-feedstock/blob/b433cecfc45129bae5fe956f11f0b7b20efa339d/recipe/meta.yaml#L21