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:/
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
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.
PYTHONPATH="/Library/Python/2.7/site-packages/clips/"
export PYTHONPATH
来源:https://stackoverflow.com/questions/6081317/using-pyclips-and-import-clips-as-a-python-module