I have a requirement to run my code in python virtual environment, for that I am trying to active the virtual environment through the python script only.
But getting error as: /bin/sh: 1: source: not found
cmd = "source ./nnvm_ndk_tools_env/bin/activate"
process = subprocess.Popen(cmd, stdout=PIPE, shell=True)
Above commands I have added in below script and run the script
python test.py
Output:
source ./nnvm_ndk_tools_env/bin/activate
/bin/sh: 1: source: not found
Can anyone please reply? I have to active the virtual env through python script only.