Virtualenvwrapper.sh函数在bash shell中不可用

quo*_*tor 2 python bash virtualenvwrapper

我正在做一个virtualenvwrapper的新安装,由于某种原因,在运行virtualenvwrapper.sh后,它的功能不可用.

$ virtualenvwrapper.sh
creating.....
$ workon
workon: command not found
Run Code Online (Sandbox Code Playgroud)

我知道它正在运行,除了成功创建所有VE文件之外,我已经在echo "please get here"语句中包含了一些函数定义,它们都受到了影响.

所以呢?

quo*_*tor 7

哦,我明白了,正确的做法是:

$ source virtualenvwrapper.sh
Run Code Online (Sandbox Code Playgroud)

我猜它是在我的PATH上,并且在子shell中运行.