I'm trying to create a virtual environment, start it, and then have every command after that be executed in the virtual environment.
1. os.system("curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py")
2. os.system("python3 get-pip.py")
3. os.system("mkdir Apps")
4. os.system("pip3 install virtualenv")
5. os.system("virtualenv virt")
6. os.system("source virt/bin/activate")
7. os.system("pip3 install flask")
This is the code I have right now and I am trying to create the virtual environment on line (5) and then trying to activate it on line (6) and then do the 7th line (install flask) on the virtual environment.
I also have tried os.system('. virt/bin/activate')
but every-time I run the python file it goes through and it does everything except start the virtual environment.
I am running this on the terminal on Mac.