cmmulxuk
V2EX  ›  Flask

virtualenv 安装的 flask ,大家是怎样开机自启动的?

  •  
  •   cmmulxuk · Dec 20, 2015 · 6034 views
    This topic created in 3979 days ago, the information mentioned may be changed or developed.
    我试着把一个 py 程序加入开机自启动

    但是失败了

    os.system('. venv/bin/activate;cd flask;python demo.py')
    7 replies  •  2016-03-14 09:37:16 +08:00
    ibigbug
    ibigbug
    Dec 21, 2015
    1
    可以使用 supervisor + uwsgi
    playniuniu
    playniuniu
    Dec 21, 2015
    2
    为啥不直接用路径呢,. venv/bin/python demo.py
    julyclyde
    julyclyde
    Dec 21, 2015❤️1
    3
    不需要 activate
    直接用 virtualenv 里面那个 python 就可以了
    cmmulxuk
    cmmulxuk
    OP
    Dec 29, 2015
    4
    @playniuniu
    @julyclyde
    直接. venv/bin/python demo.py
    显示不能错误,不能执行啊
    bash: .: flask/bin/python: cannot execute binary file
    julyclyde
    julyclyde
    Dec 31, 2015
    5
    @cmmulxuk 你为什么点它?
    mengskysama
    mengskysama
    Jan 1, 2016
    6
    生产部署不妨尝试下 docker (
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4339 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 08:58 · PVG 16:58 · LAX 00:58 · JFK 03:58
    ♥ Do have faith in what you're doing.