- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
有人可以提供有关如何在 linux 环境中安装 clips 和 clipspy 的分步过程。 pip install clipspy
对我不起作用,因为我的组织不允许使用 pip。我需要从源代码构建。
我尝试从 clipspy-0.3.0
安装 python setup.py install
但编译终止。
gcc -pthread -B /anaconda3/compiler_compat -Wl,--sysroot=/ -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes /clips_core_source_630/core/ -fPIC -Ic -Itmpclips_core_source_630core -I/anaconda3/include/python3.6m -c build/temp.linux-x86_64-3.6/_clips.c -o build/temp.linux-x86_64-3.6/build/temp.linux-x86_64-3.6/_clips.o
build/temp.linux-x86_64-3.6/_clips.c:523:19: fatal error: clips.h: No such file or directory
#include <clips.h>
^
compilation terminated.
我知道我必须安装 clips_6.30 但 src 代码中有很多 make 文件
clips_core_source_630/makefiles> ls
makefile.g++ makefile.gcc makefile.lib makefile.lib++ makefile.win
我没有 c/c++
技术经验,无法理解 clips_core_source_630
中存在的各种 makefile。
最佳答案
可以看看clipspy
travis installation引用示例的脚本。
提取 CLIPS 存档后,您可以复制源文件夹中的 makefile.lib
文件。
然后您需要稍微修改 Makefile 以将 CLIPS 构建为共享库。为此,请将 -fPIC
标志添加到 gcc
编译命令。这将生成几个适合包含在库中的 .o
文件。
使用make
命令构建源代码。然后,您可以将目标文件链接在一起以生成库文件。
ld -G *.o -o libclips.so
完成后,您可以构建并安装 clipspy
,确保您拥有最新的 cffi
和 setuptools
Python 模块。
python setup.py build_ext --include-dirs <clips_dir>/core/ --library-dirs <clips_dir>/core/
python setup.py install
关于linux - 在 linux build/temp.linux-x86_64-3.6/_clips.c 上安装 clipspy :523:19: fatal error: clips. h : No such file or directory #include <clips. h>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53928786/
documentation包含以下示例代码: ... klass = env.find_class('MyClass') instance = klass.new_instance('instance
如何使用 Clipspy 从 Python 函数中撤回 CLIPS 中的事实。我尝试使用 build() 但事实仍然存在。 ;;--KB.clp--;; (defrule main-intent
刚刚安装clipspy在 Windows-10 64 位上;并在 Jupyter notebook 中进行测试我有; from clips import Environment, Symbol imp
刚刚安装clipspy在 Fedora 26 上。我可以这样断言简单的事实: >>> from clips import Environment >>> env = Environment() >>>
是否可以使用clipspy从剪辑中读取ErrorStream?使用pyclips,它的工作方式如下:clips.ErrorStream.Read()。 使用 clipspy 执行此操作是否有意义,或者
我已经从 git 存储库安装了 CLIPSpy,并按照说明使用源文件进行安装。然而,在安装并运行 python shell 之后,我得到了这个错误: `import clips .
有人可以提供有关如何在 linux 环境中安装 clips 和 clipspy 的分步过程。 pip install clipspy 对我不起作用,因为我的组织不允许使用 pip。我需要从源代码构建。
我是一名优秀的程序员,十分优秀!