ImportError: Cannot load dynamic library. Did you compile FLANN?
2016-10-15 10:48
4303 查看
You install pyflann as :
and after that, test it via ipython
it says you have NOT compile flann. As follows:
Deep in /usr/local/lib/python2.7/dist-packages/pyflann/lib/linux/libflann.so and you will find a libflann.so already exists. BUT it’s size is 0, that’s empty library.
Now compile a flann step by step:
1.download from HERE
2.extract it
3.make
4.cp flann-1.8.4-src/build/lib/libflann.so into /usr/local/lib/python2.7/dist-packages/pyflann/lib/linux/libflann.so
5.re-try import pyflann now.
sudo pip install pyflann
and after that, test it via ipython
import pyflann
it says you have NOT compile flann. As follows:
In [1]: import pyflann --------------------------------------------------------------------------- ImportError Traceback (most recent call last) <ipython-input-1-b6d4c333a325> in <module>() ----> 1 import pyflann /usr/local/lib/python2.7/dist-packages/pyflann/__init__.py in <module>() 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 <module>() 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 <module>() 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 <module>() 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?
Deep in /usr/local/lib/python2.7/dist-packages/pyflann/lib/linux/libflann.so and you will find a libflann.so already exists. BUT it’s size is 0, that’s empty library.
Now compile a flann step by step:
1.download from HERE
2.extract it
unzip flann-1.8.4-src.zip
3.make
cd flann-1.8.4-src mkdir build cd build cmake .. make -j8
4.cp flann-1.8.4-src/build/lib/libflann.so into /usr/local/lib/python2.7/dist-packages/pyflann/lib/linux/libflann.so
sudo cp lib/libflann.so /usr/local/lib/python2.7/dist-packages/pyflann/lib/linux/libflann.so
5.re-try import pyflann now.
相关文章推荐
- import caffe 时出现Intel MKL FATAL ERROR: Cannot load libmkl_avx2.so or libmkl_def.so.
- Error:Cannot compile Groovy files: no Groovy library is defined for module "XXX"
- ImportError: The Python Imaging Library (PIL) is required to load data from jpeg files
- 【SystemTap】c独立安装elfutils导致错误 cannot load ld backend library 'libld_elf_x86_64.so' 和 error: C compiler cannot create executables
- ImportError: MemoryLoadLibrary failed loading wx_core_.pyd 故障解决
- IMPORTERROR: MEMORYLOADLIBRARY FAILED LOADING
- 关于Reveal Are you trying to load dynamic library with Reveal Framework already linked?
- ImportError: pycurl: libcurl link-time version (7.19.7) is older than compile-time version (7.54.1)
- ImportError: cannot import name Pseudo
- Android Studio import Project时出现cannot load * modules和module not specified
- Flex builder: error when import another library project's classes?
- ImportError: cannot import name downsample
- error:maven中cannot load JDBC connector
- wxPython之ImportError: DLL load failed: %1 is not a valid Win32 application.
- PHP Startup: Unable to load dynamic library
- ImportError DLL load failed: %1 不是有效的 Win32 应用程序
- maven Cannot change version of project facet Dynamic Web Module to 3.0 Error in Eclipse
- 如何解决PHP startup: Unable to load dynamic library的错误(php中的各dll间的相依关系)
- Error:Could not resolve all dependencies for configuration ':app:prodDebugCompileClasspath'. Cannot
- ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory