我最近尝试安装powerlinevim,但一直遇到问题。在
每次打开新窗口时,都会看到以下错误:Error detected while processing function 9_UpdateWindows..9_pyeval:
line 1:
Traceback (most recent call last):
File "", line 1, in
File "", line 1, in
File "opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/uuid.py", line 545, in uuid4 import random
File "opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/uuid.py", line 545, in uuid4 from os import urandom as _urandom
ImportError: cannot import name urandom
当我从.vimrc文件中删除这一行(有效地禁用了powerlinevim)时,错误就消失了。在
^{pr2}$
有趣的是,当我从终端启动python时,导入就可以正常工作了。在Python 2.7.3 (default, Nov 17 2012, 19:54:34)
[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import random
>>> from os import urandom as _urandom
>>>
其中python的输出:/opt/local/bin/python
我运行的是OSX10.8.2。在
谢谢!在