using pyclips and import clips as a python module

2019-06-08 23:14发布

am using pyclips to generate the facts a nd rules of my system .. i have download every requirements for installing pyclips which include a clips directory that contatins the python files necessary for using clips inside the python code ..

but when i write " import clips " or " import pyclips.clips" the error " " no module named clips " appear!!

so please clould any one help me to make the import correct?

just i wanna say that i put the folder pyclips insode the libraries folder in the python folder in c:/

3条回答
Viruses.
2楼-- · 2019-06-08 23:20

After the CLIPSSrc package is built, follow Mark's answer.

If on running 'import clips' in a subsequent python prompt still throws the same error that means either the clips module failed to build or the clips module is not in the python path.

You can put the clips module in in the python path by:

import sys
sys.path.append('C:\PATH\TO\clips\module\clips') # Whatever path the clips module is

Now, 'import clips' should work.

查看更多
Rolldiameter
3楼-- · 2019-06-08 23:27
PYTHONPATH="/Library/Python/2.7/site-packages/clips/"
export PYTHONPATH
查看更多
欢心
4楼-- · 2019-06-08 23:34

You can't double click the setup.py file.
First you change current dir to place which the setup.py file.
Second use command setup.py install.

You do about all, that's ok.

e.g: 

C:\Windows\System32>F:

F:\>cd F:\Downloads\pyclips-1.0.7.348\pyclips

F:\Downloads\pyclips-1.0.7.348\pyclips>setup.py install
查看更多
登录 后发表回答