YingfanWang / PaCMAP

PaCMAP: Large-scale Dimension Reduction Technique Preserving Both Global and Local Structure
Apache License 2.0
538 stars 54 forks source link

build fails without strict numba requirement #55

Closed gordonrix closed 1 year ago

gordonrix commented 1 year ago

When trying to install this with pip alongside holoviews (installed via conda), I get an error upon import:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/popos/mambaforge/envs/maple_test/lib/python3.9/site-packages/pacmap/__init__.py", line 1, in <module>
    from .pacmap import *
  File "/home/popos/mambaforge/envs/maple_test/lib/python3.9/site-packages/pacmap/pacmap.py", line 1, in <module>
    import numba
  File "/home/popos/mambaforge/envs/maple_test/lib/python3.9/site-packages/numba/__init__.py", line 43, in <module>
    from numba.np.ufunc import (vectorize, guvectorize, threading_layer,
  File "/home/popos/mambaforge/envs/maple_test/lib/python3.9/site-packages/numba/np/ufunc/__init__.py", line 3, in <module>
    from numba.np.ufunc.decorators import Vectorize, GUVectorize, vectorize, guvectorize
  File "/home/popos/mambaforge/envs/maple_test/lib/python3.9/site-packages/numba/np/ufunc/decorators.py", line 3, in <module>
    from numba.np.ufunc import _internal

I have isolated the problem to numba. When I enforce numba>=0.57, I don't get the import error, but when I allow any version of numba, 0.53 gets installed and it results in this error. Not sure if intermediate numba versions will work, but updating the dependency to be numba>=5.7 should fix it. Thanks for the great tool

hyhuang00 commented 1 year ago

Apologies for my late reply, and thanks for reporting! This is an interesting error, since my local installation of pacmap was installed alongside numba=0.53.1. Would you be able to provide more information about the dependencies? The dependencies can be found with the following commands:

mamba list annoy
mamba list numba
mamba list numpy
mamba list scikit-learn
hyhuang00 commented 1 year ago

Fixed in release 0.7.1. Thanks again for reporting!