无法将“从/导入"识别为内部或外部命令,可操作程序或批处理文件 [英] 'From/import' is not recognized as an internal or external command, operable program or batch file

查看:177
本文介绍了无法将“从/导入"识别为内部或外部命令,可操作程序或批处理文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法从scikit-learn导入机器学习算法. 我已经安装了它,但是每当我键入例如"from sklearn.naive_bayes import GaussianNB"时,它都会显示"from"未被识别为内部或外部命令,可操作程序或批处理文件. 我在Windows 10上使用Anaconda.是否存在兼容性问题?我想念什么吗? Idk我对Python还是很陌生,所以我感到迷茫.谢谢

I'm having trouble importing Machine Learning algorithms from scikit-learn. I have it installed but whenever I type for example "from sklearn.naive_bayes import GaussianNB" it says " 'from' is not recognized as an internal or external command, operable program or batch file. I'm using Anaconda on Windows 10. Is it compatibility issue? Am I missing something? Idk I'm still new to Python so I feel lost. Thanks

推荐答案

这需要在Python REPL中运行,而不是在命令行中运行.在键入Python语句之前,请务必先开始.

That needs to be run in the Python REPL, not at a command line. Be sure to start one before typing Python statements.

这篇关于无法将“从/导入"识别为内部或外部命令,可操作程序或批处理文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆