问题
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