I'm using a PC with Windows 7 and a Python 3.4 Jupyter notebook from Anaconda3 version 2.3.0.
I'm attempting to run the cell magic bash
command from a Jupyter notebook and am having problems that I imagine others will encounter as well.
From what I've seen in tutorials, it should be as simple as...
%%bash
pwd
When I attempt this, I get the error "Couldn't find program: 'bash'". This is true for other bash
commands. I have also tried !bash and that has not worked.
A few strange observations that may help:
I am able to run bash commands that don't require parameters as long as they are the first line in the cell.
In:
ls
Out:
Volume in drive D is DATA
Volume Serial Number is XXXX-XXXX
Directory of D:\...
05/19/2016 06:25 PM <DIR> .
However if I put a return above the command, it seems to interpret the cell as python and gives the "name 'ls' is not defined" error.
If I attempt to call the bash
line magic command %bash
I get the below error:
'ERROR: Line magic function `%bash` not found (But cell magic `%%bash` exists, did you mean that instead?)'.
Thanks in advance for any help.