Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when importing pyflann in python. #4

Closed
iretiayo opened this issue Jan 29, 2017 · 3 comments
Closed

Error when importing pyflann in python. #4

iretiayo opened this issue Jan 29, 2017 · 3 comments

Comments

@iretiayo
Copy link

iretiayo commented Jan 29, 2017

I installed pyflann [on Ubuntu 16.04 python 2.7] using pip but when import pyflann in python, I get the following error:

import pyflann

/usr/local/lib/python2.7/dist-packages/pyflann/init.py in ()
25 #THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
---> 27 from index import *
28 from io.dataset import load, save
29 try:

/usr/local/lib/python2.7/dist-packages/pyflann/index.py in ()
25 #THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
---> 27 from bindings.flann_ctypes import *
28 from io.dataset import *
29 import numpy.random as _rn

/usr/local/lib/python2.7/dist-packages/pyflann/bindings/init.py in ()
28 #from pyflann_parameters import parameter_list, algorithm_names
29 #from pyflann_parameters import centers_init_names, log_level_names
---> 30 from flann_ctypes import *

/usr/local/lib/python2.7/dist-packages/pyflann/bindings/flann_ctypes.py in ()
171 flannlib = load_flann_library()
172 if flannlib == None:
--> 173 raise ImportError('Cannot load dynamic library. Did you compile FLANN?')
174
175

ImportError: Cannot load dynamic library. Did you compile FLANN?

@peterbandi
Copy link

It is the same for me. The ~/.local/lib/python2.7/site-packages/pyflann/lib/linux/libflann.so is 0 bytes long. I have also downloaded the package from the the Python Package Index manually but the mentioned so file is 0 bytes there too. It seems that this package version is broken on Linux. Please fix the package.

@primetang
Copy link
Owner

primetang commented Feb 6, 2017

I have been recompiled the pyflann/lib/linux/libflann.so file, and it works on linux now in my test. Please try again. Thanks very much for your correction.

@primetang primetang reopened this Feb 6, 2017
@iretiayo
Copy link
Author

iretiayo commented Feb 6, 2017

I tried it and it now works . Thanks @primetang

@iretiayo iretiayo closed this as completed Feb 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants