Closed wanxinyang closed 2 years ago
In the geog0111/notebook/018_Running_Python.ipynb, the first code cell under the section Running a Python script got a warning of Permission denided because the file geog0111/helloWorld.py is not executable.
!geog0111/helloWorld.py /bin/bash: geog0111/helloWorld.py: Permission denied
!geog0111/helloWorld.py
!ls -l geog0111/helloWorld.py -rw-r--r-- 1 ucfawya ucfapb 514 Oct 6 17:01 helloWorld.py
!ls -l geog0111/helloWorld.py
The possible solutions to this would be: Method 1: make the file executable !chmod u+x geog0111/helloWorld.py
!chmod u+x geog0111/helloWorld.py
Or
Method 2: call python interpreter !python geog0111/helloWorld.py
!python geog0111/helloWorld.py
I have fixed this by giving the following, similar to you suggestion. Thanks.
%%bash chmod +x geog0111/helloWorld.py
geog0111/helloWorld.py
In the geog0111/notebook/018_Running_Python.ipynb, the first code cell under the section Running a Python script got a warning of Permission denided because the file geog0111/helloWorld.py is not executable.
!geog0111/helloWorld.py
/bin/bash: geog0111/helloWorld.py: Permission denied!ls -l geog0111/helloWorld.py
-rw-r--r-- 1 ucfawya ucfapb 514 Oct 6 17:01 helloWorld.pyThe possible solutions to this would be: Method 1: make the file executable
!chmod u+x geog0111/helloWorld.py
Or
Method 2: call python interpreter
!python geog0111/helloWorld.py