After creating virtual environment
virtualenv env
why do we need to fire source
command ?
source env/bin/activate
What is the use of source command in general in linux ?
Advertisement
Answer
source : it will read file and execute cmd in file, in current shell environment.
usually it’s used to add some environment vars.
for example.
> echo $MY_ENV // nothing > cat foo.txt export MY_ENV=bar > source foo.txt // after source, MY_ENV is set in current env > echo $MY_ENV bar