virtualenvwrapper functions unavailable in shell scripts

前端 未结 8 823
夕颜
夕颜 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:46

    You can also call the virtualenv's python executable directly. First find the path to the executable:

    $ workon myenv
    $ which python
    /path/to/virtualenv/myenv/bin/python
    

    Then call from your shell script:

    #!/bin/bash
    
    /path/to/virtualenv/myenv/bin/python myscript.py
    

提交回复
热议问题