deactivate:unset:1: 没有这样的散列 table 元素: pydoc

deactivate:unset:1: no such hash table element: pydoc

我正在尝试设置我的新笔记本电脑的开发环境。安装 zsh 后我不断收到错误

deactivate:unset:1: no such hash table element: pydoc Please help. I have following simple aliases in my zshrc:

alias c="clear"
alias gpl="git pull"
alias gps="git push"
alias gc="git commit"
alias gck="git checkout"
alias d="git diff"
alias s="git status".

可以看到virtualenv pr on github.

或者你可以更改deactivate()函数。

unset -f pydoc更改为unset -f pydoc >/dev/null 2>&1

此错误出现在 zsh 的发布版本中。它已修复但尚未发布。我已经在 github 上确认了这一点。关注这个link。 谢谢!

尝试安装最新版本的 virtualenv。

尚未发布,但您可以运行此命令获取它:

pip install https://github.com/pypa/virtualenv/tarball/develop

目前唯一的变化就是这个小修复。你可以看到更新日志 here, and the files changed on that fix for reference are available here.

建议不要手动修改,安装fork版本即可。 (甚至更容易)