teddykoker / torchsort

Fast, differentiable sorting and ranking in PyTorch
https://pypi.org/project/torchsort/
Apache License 2.0
765 stars 33 forks source link

In Python 3.9, running 'torchsort' will report a error #53

Closed pilgrimygy closed 2 years ago

pilgrimygy commented 2 years ago

Specifically, when I use python 3.9, it will report this error:

ImportError: /home/gyyang/anaconda3/lib/python3.9/site-packages/torchsort/isotonic_cpu.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZN3c105ErrorC2ENS_14SourceLocationESs

But Python 3.8 is not such an error.

teddykoker commented 2 years ago

Hey @pilgrimygy. I added python 3.8, 3.9, and 3.10 to the CI tests; all tests are passing. Have you tried reinstalling with the new python version?

pilgrimygy commented 2 years ago

I will test it and give you feedback. Thank you so much!

XiaojunTan commented 8 months ago

I fixed the problem with 3steps:

  1. pip cache remove torchsort
  2. pip uninstall torchsort
  3. pip install torchsort.

Let me know if it also works for you.