Closed Subash-Chandra closed 4 years ago
I don't have a ton of experience with Conda, but does this help?
That is for running conda commands in a bash script. I am asking for the reverse.
Are you able to run these scripts on Bash? Because I'm having errors like "Permission Denied" if I try "python starry_stanford.sh", and if I try to run "py starry_stanford.sh", it says the $PYTHON in Line 18 is Invalid Syntax.
@Subash-Chandra Oh, you are using the wrong interpreter then. You run .py
scripts with the Python interpreter (python
or python3
), and you run bash scripts (files that end in .sh
) with sh
, bash
, or ./
with no space between it and the script:
# How to run Python scripts
python neural_style.py
python3 neural_style.py
# How to run Bash scripts
sh starry_stanford.sh
bash starry_stanford.sh
./starry_stanford.sh
To correct permission issues with bash scripts, use:
chmod u+x starry_stanford.sh
omg that makes sense. Thank you so much.
I'm still getting permission issues though...
I've found the solution here. Darn Microsoft devs.
https://stackoverflow.com/questions/56974927/permission-denied-trying-to-run-python-on-windows-10
How do I run the scripts through Conda? When I try to run it through Conda, it just keeps trying to open Bash and run it through that.
I edited the starry_stanford.sh script, and am trying to run it, someone help me out please.