1

我现在在我刚刚从 GitHub 克隆的一些开源项目上设置工作环境,运行后

pip install -U -r requirements.txt

当然,在 virtualenv 中,我试图在fab sanity这个项目使用结构时运行,但我收到以下错误:

(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...
4

1 回答 1

0

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

于 2014-01-31T10:53:28.460 回答