unisim icon indicating copy to clipboard operation
unisim copied to clipboard

TypeError: unsupported operand type(s) for |: 'type' and 'EnumMeta'

Open aishwaryap opened this issue 1 year ago • 0 comments

Hi all,

I am newly trying unisim via pip install and I get the following error:

>>> from unisim import TextSim
WARNING:root:ONNX is running on CPU - you need to install CUDA/onnxruntime-gpu to run on GPU
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/lustre/fs5/portfolios/llmservice/users/apadmakumar/venvs/unisim_env/lib/python3.9/site-packages/unisim/__init__.py", line 8, in <module>
    from .textsim import TextSim
  File "/lustre/fs5/portfolios/llmservice/users/apadmakumar/venvs/unisim_env/lib/python3.9/site-packages/unisim/textsim.py", line 18, in <module>
    from .unisim import UniSim
  File "/lustre/fs5/portfolios/llmservice/users/apadmakumar/venvs/unisim_env/lib/python3.9/site-packages/unisim/unisim.py", line 23, in <module>
    class UniSim(ABC):
  File "/lustre/fs5/portfolios/llmservice/users/apadmakumar/venvs/unisim_env/lib/python3.9/site-packages/unisim/unisim.py", line 35, in UniSim
    index_type: str | IndexerType,
TypeError: unsupported operand type(s) for |: 'type' and 'EnumMeta'

Note that I newly created a virtualenv using Python3.9 and the only install command I did was:

pip install unisim

Then I opened an interactive Python shell and tried the above command and got the above error.

pip freeze shows that the following packages have been automatically installed as dependencies with unisim:

coloredlogs==15.0.1
flatbuffers==24.3.25
humanfriendly==10.0
jaxtyping==0.2.34
mpmath==1.3.0
numpy==2.0.2
onnx==1.17.0
onnxruntime==1.19.2
packaging==24.1
pandas==2.2.3
protobuf==5.28.2
python-dateutil==2.9.0.post0
pytz==2024.2
simsimd==5.8.0
six==1.16.0
sympy==1.13.3
tabulate==0.9.0
tqdm==4.66.5
typeguard==2.13.3
tzdata==2024.2
unisim==1.0.1
usearch==2.15.3

aishwaryap avatar Oct 18 '24 17:10 aishwaryap