运行fab sanity会出错:没有名为quilt的模块

时间:2014-01-31 10:44:13

标签: python django virtualenv pip quilt

我现在正在从GitHub克隆的一些开源项目中设置工作环境, 跑完后

pip install -U -r requirements.txt

在virtualenv当然,我试图运行fab sanity,因为这个项目使用了fabric,我收到以下错误:

(openmuni)oleg@oleg-Lenovo-G580:~/dev/openmuni-budgets$ fab sanity
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/fabric/main.py", line 637, in main
    docstring, callables, default = load_fabfile(fabfile)
  File "/usr/lib/python2.7/dist-packages/fabric/main.py", line 164, in load_fabfile
    imported = importer(os.path.splitext(fabfile)[0])
  File "/home/oleg/dev/openmuni-budgets/fabfile/__init__.py", line 1, in <module>
    from quilt import *
ImportError: No module named quilt

不幸的是,最无关紧要的2个解决方案无效:

(openmuni)oleg@oleg-Lenovo-G580:~/dev/openmuni-budgets$ pip install quilt
Requirement already satisfied (use --upgrade to upgrade): quilt in /home/oleg/.virtualenvs/openmuni/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): Fabric>=1.8.0 in /home/oleg/.virtualenvs/openmuni/lib/python2.7/site-packages (from quilt)
Requirement already satisfied (use --upgrade to upgrade): cuisine>=0.6.5 in /home/oleg/.virtualenvs/openmuni/lib/python2.7/site-packages (from quilt)
Requirement already satisfied (use --upgrade to upgrade): paramiko>=1.10.0 in /home/oleg/.virtualenvs/openmuni/lib/python2.7/site-packages (from Fabric>=1.8.0->quilt)
Requirement already satisfied (use --upgrade to upgrade): pycrypto>=2.1,!=2.4 in /home/oleg/.virtualenvs/openmuni/lib/python2.7/site-packages (from paramiko>=1.10.0->Fabric>=1.8.0->quilt)
Requirement already satisfied (use --upgrade to upgrade): ecdsa in /home/oleg/.virtualenvs/openmuni/lib/python2.7/site-packages (from paramiko>=1.10.0->Fabric>=1.8.0->quilt)
Cleaning up...

(openmuni)oleg@oleg-Lenovo-G580:~/dev/openmuni-budgets$ pip install python-quilt
Requirement already satisfied (use --upgrade to upgrade): python-quilt in /home/oleg/.virtualenvs/openmuni/lib/python2.7/site-packages
Cleaning up...

1 个答案:

答案 0 :(得分:0)

运行: deavtivate 然后 pip install python-quilt解决了它,但这意味着quilt现在是全局的,并且安装在virtualenv之外,有点像黑客。