primetang / pyflann

python bindings for FLANN - Fast Library for Approximate Nearest Neighbors.
Other
122 stars 55 forks source link

ImportError: No module named 'index' #8

Open ShaoYuanHo opened 6 years ago

ShaoYuanHo commented 6 years ago

Hi, I use pip to install pyflann and my environment is python3.5 when I compile "from pyflann import *", I got an error like this:

from pyflann import File "/.../anaconda3/lib/python3.5/site-packages/pyflann/init.py", line 27, in from index import ImportError: No module named 'index'

so what I do next is pip install index, but I found the information: only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)]

is there any way to use pyflann in python3.5? Thank a lot

proteomis commented 5 years ago

Hello, I had the same problem. Have a look at this link. Install the 2to3 Python library and translate pyflann as indicated : 2to3 -w <path to pyflann in python dist-packages> It should solve the problem. It did on my installation. Regards Alain

xiongraorao commented 5 years ago

Thanks a lot, I have solved this problem.

XxoF commented 3 years ago

You can try this command: pip install pyflann-py3 or python -m pip install pyflann-py3

adityanair174 commented 1 year ago

Tried all the methods, none of them work. Any help? I keep getting the FLANN error, post converting code using 2to3. I also manually changed to see if it works that way but, unfortunately it did not. Any help would be much appreciated

AlineFurtado commented 1 year ago

Hello. Did you manage to solve the problem? Could you help me, I have the same error in python 3.8 And when using colleague's solution "pip install pyflan3" I have new problem: from .flann_ctypes import * raise ImportError('Cannot load dynamic library. Did you compile FLANN?') ImportError: Cannot load dynamic library. Did you compile FLANN?

adityanair174 commented 1 year ago

Hey,

No I wasn’t able to solve this error. I believe that the library is not maintained anymore.

Probably you can try using another algo maybe FAISS, KNN or ANNOY.

I haven’t used them personally. If are able to use and solve then do let me know.

Thanks I’m advance!

On Tue, 11 Jul 2023 at 12:27 AM, AlineFurtado @.***> wrote:

Hello. Did you manage to solve the problem? Could you help me, I have the same error in python 3.8 And when using colleague's solution "pip install pyflan3" I have new problem: from .flann_ctypes import * raise ImportError('Cannot load dynamic library. Did you compile FLANN?') ImportError: Cannot load dynamic library. Did you compile FLANN?

— Reply to this email directly, view it on GitHub https://github.com/primetang/pyflann/issues/8#issuecomment-1629536172, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANVJLS7ZBERHQWXHQQNHQ4LXPRGBHANCNFSM4FJ2IJ6Q . You are receiving this because you commented.Message ID: @.***>