在 Anaconda Python 2.7 Spyder 中无法识别“ls”

xer*_*era 2 python-2.7 spyder anaconda

我在 Anaconda Spyder Python 2.7 for Windows 7 64bits 中运行我的代码。

但是当我运行这段代码时:

!ls -lh ./training3.crfsuite
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

'ls' is not recognized as an internal or external command, operable program or batch file.    
Run Code Online (Sandbox Code Playgroud)

有谁知道为什么?

谢谢你。

Geo*_*pis 13

您可以使用 Anaconda Prompt 命令行安装 m2-base 实用程序,并且您将拥有基本的 Linux 命令:

conda install m2-base
Run Code Online (Sandbox Code Playgroud)


Ign*_*ams 7

ls是 *nix 命令,默认情况下不安装在 Windows 下。请改用dir及其适当的选项。