This is my python file wish to run:my_python.py
import os
import numpy as np
os.mkdir(<some path>)
example_code = np.empty(1)This is my script to run this python script: run_python.sh
python ./my_python.pyThis is how I run the .sh file:
bash ./run_python.shThen, I get this error:
PermissionError: [Errno 13] Permission denied: '<some path>'But when I try running .sh as sudo: run_python.sh
sudo bash ./run_python.shI get this python error:
import numpy as np
ImportError: No module named numpyHow do I run .py using .sh with the permission to run os.mkdir()?
I want to run: "run_python.sh -> my_python.py -> mkdir()"
2 Reset to default