gpt4 book ai didi

python - 为什么 Upstart 不能运行 'source bin/activate' ?

转载 作者:IT老高 更新时间:2023-10-28 22:01:32 25 4
gpt4 key购买 nike

upstart 出于某种原因不会激活我的 virtualenv。

这就是我的运行方式

script
# My startup script, plain old shell scripting here.
cd path/to/env
source bin/activate
....
end script

手动启动时 virtualenv 运行良好

为什么这不起作用?

最佳答案

所以我已经解决了,由于某种原因 Upstart 不喜欢使用“源”,所以我将行改为:

source bin/activate

. bin/activate

这行得通,但不知道为什么,如果有人能解释一下,我会很感兴趣

关于python - 为什么 Upstart 不能运行 'source bin/activate' ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14823001/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com