I am trying to run a Python script (ring_spin_eigenvalues.py
, see the code below) in an .rmd file in RStudio. I am using a bash-type code chunk and calling the script from there. number_spins
is just the variable, and the script is located in the working directory I have previously set.
number_spins=3
python3 ring_spin_eigenvalues.py $number_spins
However, when I run the chunk I got an error:
Error in engine(options) :
/usr/bin/bash: line 1: /c/Users/Luca/AppData/Local/Microsoft/WindowsApps/python3: Permission denied
Calls: <Anonymous> ... process_group.block -> call_block -> block_exec -> in_dir -> engine
In addition: Warning message:
In system2(cmd, code, stdout = TRUE, stderr = TRUE, env = options$engine.env) :
running command '"bash" -c "number_spins=3
python3 ring_spin_eigenvalues.py $number_spins"' had status 126
The exiting status is 126, so it is like it finds the command (python3) in the directory, but it has no permission to execute it. Do you have any ideas how to fix it?
Thanks a lot in advance to everyone!
Luca