Sharing scripts that require a virtualenv to be activated

后端 未结 3 430
醉酒成梦
醉酒成梦 2021-02-02 07:21

I have virtualenv and virtualenvwrapper installed on a shared Linux server with default settings (virtualenvs are in ~/.virtualenvs). I have several Python scripts that can onl

3条回答
  •  余生分开走
    2021-02-02 07:28

    I would vote for adding a shebang line in scriptname pointing to the correct virtualenv python. You just tell your users the full path to scriptname (or put it in their PATH), and they don't even need to know it is a Python script.

    If your users are programmers, then I don't see why you wouldn't want them to know/learn about virtualenv.

提交回复
热议问题