为什么像 workon 这样的 virtualenvwrapper 命令在wing ide pro 终端中不起作用?
bash: workon: command not found
翼 ide pro 之外的任何其他 bash 终端都在工作。
为什么像 workon 这样的 virtualenvwrapper 命令在wing ide pro 终端中不起作用?
bash: workon: command not found
翼 ide pro 之外的任何其他 bash 终端都在工作。
我的猜测是出于某种原因,Wing 中的 PATH 存在一些差异。如果在 OS X 上,这可以通过从命令行启动 Wing 来解决,因此它继承了正确的环境。在其他操作系统上,我不知道为什么这个环境会有所不同。
如果您尝试在 Wing 中使用特定的 virtualenv,您需要在 Wing Pro 或 Wing Personal 的 Project 菜单中的 Project Properties 中将 Python Executable 设置为 virtualenv 的 Python 可执行文件。
或者在那里运行 workon 后从命令行启动 Wing。
在 Wing 的 OS 命令工具中运行 workon 不会改变 Wing 已经在其中运行的环境。它只会改变那个 bash 实例的环境,并且在那里使用 Python 会绕过 IDE 的大部分功能。