简体   繁体   English

FLANN Python绑定Mac OS X

[英]FLANN Python Bindings Mac OS X

I've installed FLANN with the following command: 我已经使用以下命令安装了FLANN:

brew install flann --enable-python

But I cannot import the module from within Python: 但是我无法从Python导入模块:

In [4]: import pyflann
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-4-b6d4c333a325> in <module>()
----> 1 import pyflann

ImportError: No module named pyflann

Both flann and pyflann don't work. flannpyflann都不起作用。 It would also be nice if I could make this module available within a virtualenv as well. 如果我也可以在virtualenv中使此模块可用,那也很好。

Help would be much appreciated, thank you. 帮助将不胜感激,谢谢。

I got it! 我知道了! I looked in here /usr/local/Cellar/flann/1.8.4/share/flann/python and saw a setup.py file. 我在这里查看/usr/local/Cellar/flann/1.8.4/share/flann/python并看到了setup.py文件。 I enabled my virtualenv and then ran python setup.py install . 我启用了virtualenv,然后运行python setup.py install It now works! 现在可以使用了!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM