问题
I am able to import sklearn using the python interpreter, but when I try to do the same in an iPython notebook, iPython throws an ImportError. Any idea what is causing this issue? I need to use a module in iPython.
I'm not sure if this will be helpful, but here is a subset of the packages that I have installed on my machine.
I followed the instructions here regarding the installation process: http://shanshanchen.com/2013/05/29/install-numpy-scipy-scikit-learn-on-mac-os-x-for-data-miners/
回答1:
The problem could be solved by the below commands in the notebook.
!pip install scipy
!pip install sklearn
来源:https://stackoverflow.com/questions/22753731/ipython-cannot-import-module-named-sklearn