这是一个创建于 4559 天前的主题,其中的信息可能已经有所发展或是发生改变。
我现在用的系统的mac os x,然后shell是zsh,结果发现在创建了virtualenv的目录下面source bin/activate 之后,并且安装了fabric之后能够正常使用fab,但是当我打开vim之后运行:!fab,确报了下面这个错误:
Traceback (most recent call last):
File "/usr/local/bin/fab", line 5, in <module>
from pkg_resources import load_entry_point
File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 2793, in <module>
File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 673, in require
def subscribe(self, callback):
File "build/bdist.macosx-10.9-intel/egg/pkg_resources.py", line 576, in resolve
plugin_env, full_env=None, installer=None, fallback=True
pkg_resources.DistributionNotFound: Fabric==1.8.0
shell returned 1
这个错误的原因是python的path没改变导致的貌似,但是这是为什么呢?同样的操作和配置在archlinux下确没有问题。
第 1 条附言 2013 年 11 月 1 日
我发现通过chsh -s /bin/zsh制定shell就会有问题
但是如果从bash里面执行/bin/zsh就没有问题,不知道什么原因,没法理解
第 2 条附言 2013 年 11 月 1 日 最终通过再vim里面set shell=/bin/bash解决,完全不知道原理是什么