'Ls' Is Not Recognized in Anaconda Python 2.7 Spyder

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 Answers

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

4

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

conda install m2-base

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest