Activating a VirtualEnv using a shell script doesn't seem to work

后端 未结 5 1780
孤独总比滥情好
孤独总比滥情好 2020-12-23 19:16

I tried activating a VirtualEnv through a shell script like the one below but it doesn\'t seem to work,

#!/bin/sh
source ~/.virtualenvs/pinax-env/bin/activa         


        
5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-23 19:57

    On Mac OS X your proposals seems not working.

    I have done it this way. I'am not very happy with solution, but share it anyway here and hope, that maybe somebody will suggest the better one:

    In activate.sh I have

    echo 'source /Users/andi/.virtualenvs/data_science/bin/activate'
    

    I give execution permissions by: chmod +x activate.sh

    And I execute this way:

    `./activate.sh`
    

    Notice that there are paranthesis in form of ASCII code 96 = ` ( Grave accent )

提交回复
热议问题