virtualenvwrapper functions unavailable in shell scripts

前端 未结 8 786
夕颜
夕颜 2020-12-01 03:44

So, once again, I make a nice python program which makes my life ever the more easier and saves a lot of time. Ofcourse, this involves a virtualenv, made with the mkvi

8条回答
  •  遥遥无期
    2020-12-01 03:54

    It's a known issue. As a workaround, you can make the content of the script a function and place it in either ~/.bashrc or ~/.profile

    function run-app() {
      workon "$(cat .venv)"
      python main.py
    } 
    

提交回复
热议问题