ImportError: No module named api

问题:

>>> import fabric                            
Traceback (most recent call last):
  File "", line 1, in
  File "/root/liuyiping/fabric.py", line 2, in
ImportError: No module named api

解决:

安装两个包:

pip install  pycrypto

pip install ecdsa


安装后如果提示 fab 不存在,则进行软连接

[root@localhost bin]# ln -s /usr/local/python27/bin/fab /usr/bin/fab

备注:/usr/local/python27/bin/fab  目录为自己安装的路径

你可能感兴趣的:(ImportError: No module named api)