How do I install Python modules as another user into that user's python environment?
I tried the following lines in a bash script but pip install is still running in the global python environment.
sudo -i -u otheruser source /home/otheruser/project/project-env/bin/activate
sudo -i -u otheruser pip install -r /home/otheruser/project/project/requirements.txt
Thanks.