刚刚在Windows-10 64bit上安装了clipspy;并在Jupyter笔记本中测试 我有;
from clips import Environment, Symbol
import os
env = Environment
env.load('D:\\Documents\\Clips\\clipspy\\Tree_Solve_Learn.clp')
得到这个
TypeError
Traceback (most recent call last)
<ipython-input-18-a08421f4802a> in <module>()
----> 1 env.load('D:\\Documents\\Clips\\clipspy\\Tree_Solve_Learn.clp')
TypeError: load() missing 1 required positional argument: 'path'
所以得到了一个ls
Volume in drive D is DATA
Volume Serial Number is 443F-982E
Directory of D:\Documents\Clips\clipspy
12/04/2017 07:52 PM <DIR> .
12/04/2017 07:52 PM <DIR> ..
12/04/2017 07:44 PM <DIR> .ipynb_checkpoints
12/03/2017 07:03 PM 59 1stText.py
12/03/2017 01:32 PM 925 animal.dat
10/17/2017 06:43 PM <DIR> clipspy
10/17/2017 06:53 PM 20,766 clipspy-0.1.0.tar.gz
12/03/2017 01:30 PM 3,373 Tree_Solve_Learn.clp
12/03/2017 09:19 PM 19,311 Untitled.ipynb
12/03/2017 09:22 PM 555 Untitled1.ipynb
12/03/2017 09:19 PM 72 Untitled2.ipynb
12/04/2017 07:52 PM 1,972 Untitled3.ipynb
8 File(s) 47,033 bytes
4 Dir(s) 1,862,987,104,256 bytes free
和 .clp 文件在那里
挣扎w/
文档 - 主要是因为我不是那么经验但不是初学者
还有其他人在Window的环境中尝试'clippy'吗?
由于 WJ
答案 0 :(得分:2)
从示例中看,您似乎没有正确初始化Environment
对象。
from clips import Environment, Symbol
import os
env = Environment() # <--- initialize the object like this
env.load('D:\\Documents\\Clips\\clipspy\\Tree_Solve_Learn.clp')