'bash: Python source venv/bin/activate No such file or directory
I have a venv called TimmyEnv which should get activated to run a python script in a bash file.
The TimmyEnv folder is at /home/timmya/TimmyMain-SS/TimmyEnv and the bash file called startTimmyMain.sh is in /home/timmya.
The TimmyEnv has following folders: bin, include, lib, lib64, pyvenv.cfg. Because I'm not familiar with linux, I can't say if that's a venv or not. However I can't see activate in bin.
Bash file:
cd TimmyMain-SS
source TimmyEnv/bin/activate
nohup python3.8 main.py &
When I run sudo su - timmya -c "bash startTimmyMain.sh" in /home/timmya, I get this error:
startTimmyMain.sh: line 2: TimmyEnv/bin/activate: No such file or directory
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
