我正在尝试在 python 脚本中使用 mlpack。我刚刚将 mlpack 包从源代码安装到我的目录中/home/glassjawed/local/
,并且
glassjawed@Y9Acer:~$ ls local/lib | grep mlpack
libmlpack.so
libmlpack.so.3
libmlpack.so.3.0
glassjawed@Y9Acer:~$ ls local/include/mlpack/bindings/python
get_arma_type.hpp print_defn.hpp
get_cython_type.hpp print_doc_functions.hpp
get_numpy_type_char.hpp print_doc_functions_impl.hpp
get_numpy_type.hpp print_doc.hpp
get_param.hpp print_input_processing.hpp
get_printable_param.hpp print_output_processing.hpp
get_python_type.hpp print_pyx.hpp
import_decl.hpp py_option.hpp
mlpack strip_type.hpp
print_class_defn.hpp
所以显然安装了mlpack。但是,我似乎无法在 python 中运行它,因为我得到了一个找不到模块的错误。
glassjawed@Y9Acer:~$ python
Python 3.6.7 | packaged by conda-forge | (default, Nov 21 2018, 03:09:43)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>> import mlpack
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'mlpack'
为什么会发生这种情况,我该如何解决?我什么都试过了。`