开发者

fabric python install problem

Just installed fabric, trying to use to same fabfile that works on a different server, getting this error here:

Traceback (most recent call last):
  File "/var/lib/python-support/python2.6/fabric.py", line 1211, in main
    load(fabfile, fail='warn')
  File "/var/lib/python-support/python2.6/fabric.py", line 467, in load
    execfile(filename)
  File "fabfile.py", line 2, in <module>
    from fabric.api import *
ImportError: No module n开发者_如何学JAVAamed api


Your problem is that you named a file fabric.py somewhere in your python path. (probably in your current working directory) Rename it to something else and then it will not have any issues. I accidentally do this all the time and it is annoying.


Looks like you have different versions of Fabric on those servers, they changed the module structure recently.


I just got this message on my Ubuntu 9.10 machine; Ubuntu ships with an old version of fabric (0.1.1). The latest release version is 0.9.0.

sudo easy_install fabric

should get you the latest released version.


I had this problem when I installed fabric using disutils on OS X. So I removed it and reinstalled with pip. works fine.

To remove: Delete the Fabric egg in site-packages directory.

then install using pip

sudo pip install fabric
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜