pythonpython-3.xflann

No module named 'index' after install pyflann


I have some problems installing pyflann in python 3.7.3, after execute:

pip install pyflann

The installation is successfully accomplished, but when I import the library and a run a python program, I got this error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Anaconda3\lib\site-packages\pyflann\__init__.py", line 27, in <module>
    from index import *
ModuleNotFoundError: No module named 'index'

I'm using window 10. How can I fixed?


Solution

  • pyflann does not have support for python 3 yet, according to this GitHub issue. Your two options are:

    Install the pyflann-py3 package:

    pip install pyflann-py3
    

    Or, you could take the advice from the issue and use 2to3:

    sudo 2to3 -w D:\Anaconda3\lib\site-packages\pyflann