'From/import' is not recognized as an internal or external command, operable program or batch file

两盒软妹~` 提交于 2019-12-17 17:09:01

问题


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


回答1:


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




回答2:


You need to write the Import command in the Python terminal. You can activate the Python terminal using the "Python" command.



来源:https://stackoverflow.com/questions/37311877/from-import-is-not-recognized-as-an-internal-or-external-command-operable-pro

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!