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 命令时,我都会
基础教程推荐
- 由Python将MP3转换为MIDI(类型错误:无法加载插件:mtg-Melodia:Melodia) 2022-01-01
- pyserial - 可以从线程 a 写入串行端口,是否阻塞从线程 b 读取? 2022-01-01
- 与常规 dict 相比,Python manager.dict() 非常慢 2022-01-01
- 使用生成器和迭代器时 Python 多循环失败 2022-01-01
- 将 x 轴刻度更改为自定义字符串 2022-01-01
- 用 Python 编写 Fortran 无格式文件 2022-01-01
- numpy float:比算术运算中内置的慢 10 倍? 2022-01-01
- 尝试制作WhatsApp机器人 2022-01-01
- 在 Celery 工作人员中捕获 Heroku SIGTERM 以优雅地关 2022-01-01
- Discord.py 缺少必需的参数 2022-01-01
