I want to make shell script that makes virtualenv, activates it, install some libraries and run python script with it.
But I have problem that I can't activate virtualenv in shell script unless i do "source script.sh" but then python3 doesn't work. How can I do something like this?
#!/bin/bash
python3 -m pip install virtualenv
python3 -m virtualenv virtual
source virtual/bin/activate
pip install <some libraries>
python <filename.py>
I would like to do this without any global paths to python. I want it to work locally.