'ls' is not recognized in Anaconda Python 2.7 Spyder

20.9k views Asked by At

I run my codes in Anaconda Spyder Python 2.7 for Windows 7 64bits.

But when I run this code:

!ls -lh ./training3.crfsuite

I received this error:

'ls' is not recognized as an internal or external command, operable program or batch file.    

Does anyone know why?

Thank you.

2

There are 2 answers

4
Ignacio Vazquez-Abrams On BEST ANSWER

ls is a *nix command, and is not installed under Windows by default. Use dir and its appropriate options instead.

0
George Pipis On

You can install the m2-base utilities using Anaconda Prompt command line and you will have the basic Linux commands.:

conda install m2-base