为什么每当我运行 virtualenvwrapper 命令时,我都会

时间:2023-03-25
本文介绍了为什么每当我运行 virtualenvwrapper 命令时,我都会突然看到“Usage: source deactivate"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前在使用 virtualenvwrapper 时从未看到此消息,但现在我突然在运行时看到此消息,例如 mkvirtualenv <environment>workon <environment>:

I never used to see this message before when using virtualenvwrapper, but now I'm suddenly seeing this message whenever I run, say, mkvirtualenv <environment> or workon <environment>:

Usage: source deactivate

removes the 'bin' directory of the environment activated with 'source
activate' from PATH. 

我根本没有修改 virtualenvwrapper,快速谷歌搜索只会产生 这个 GitHub 问题——我确实安装了 IPython/Anaconda,但我不确定它会如何干扰 virtualenvwrapper.在任何情况下,我都尝试更新(conda update conda; conda update ipython),以及将 virtualenvwrapper 本身更新到 v4.1.1,但我仍然看到这个错误.

I haven't modified virtualenvwrapper at all, and a quick google search only yields this GitHub issue -- I did install IPython/Anaconda a while back, but I'm not sure how it might be interfering with virtualenvwrapper. In any case, I tried updating both (conda update conda; conda update ipython), as well as updating virtualenvwrapper itself to v4.1.1, but I'm still seeing this error.

我正在运行 OS X 10.8.4.

I'm running OS X 10.8.4.

推荐答案

workon,定义在/usr/local/bin/virtualenvwrapper.sh,调用<代码>停用.Anaconda 的 bin 中存在同名脚本,因此它会被 workon 调用.

workon, which is defined in /usr/local/bin/virtualenvwrapper.sh, calls deactivate. A script of the same name is present in Anaconda's bin, so it gets called by workon.

到目前为止,我发现的最佳解决方案是在 Anaconda 的 bin 中重命名 activate 和 deactivate.如果有更好的解决方案,请发表评论,我会更新这个答案.

The best solution I've found so far is to rename activate and deactivate in Anaconda's bin. If there's a better solution, please comment and I'll update this answer.

这篇关于为什么每当我运行 virtualenvwrapper 命令时,我都会突然看到“Usage: source deactivate"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

上一篇:Anaconda3 activate.bat 未被识别为内部或外部命令 下一篇:如果参数大小大于 8192,为什么 numpy.sin 会返回不

相关文章

最新文章