Why I am suddenly seeing `Usage: source deactivate` whenever I run virtualenvwrapper commands?(为什么每当我运行 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"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:为什么每当我运行 virtualenvwrapper 命令时,我都会
基础教程推荐
- 修改列表中的数据帧不起作用 2022-01-01
- 包装空间模型 2022-01-01
- PermissionError: pip 从 8.1.1 升级到 8.1.2 2022-01-01
- 求两个直方图的卷积 2022-01-01
- Plotly:如何设置绘图图形的样式,使其不显示缺失日期的间隙? 2022-01-01
- 在同一图形上绘制Bokeh的烛台和音量条 2022-01-01
- 在Python中从Azure BLOB存储中读取文件 2022-01-01
- 无法导入 Pytorch [WinError 126] 找不到指定的模块 2022-01-01
- 使用大型矩阵时禁止 Pycharm 输出中的自动换行符 2022-01-01
- PANDA VALUE_COUNTS包含GROUP BY之前的所有值 2022-01-01
