Reputation: 145
I try to import scikit-learn, but there is an error. i installed sklearn, scipy on anaconda. i am using W10 and python 3.5.
>>> import sklearn
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import sklearn
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python35-32\lib\site-packages\sklearn\__init__.py", line 57, in <module>
from .base import clone
File "C:\Users\lenovo\AppData\Local\Programs\Python\Python35-32\lib\site-packages\sklearn\base.py", line 9, in <module>
from scipy import sparse
ImportError: No module named 'scipy'
Upvotes: 0
Views: 2377
Reputation: 455
Using pip, or interpreter setting in pycharm:
pip install NumPy+mkl
numpy-mkl 1.10.2
Install module NumPy+mkl
pip install SciPy
Install module SciPy
Now you can install sklearn.
Hope that it is useful.
Upvotes: 0
Reputation: 5102
Use pip to install the packages
Ensure you have appropriate privileges for installing globally or in virtual environment.
Upvotes: 1
Reputation: 13709
In linux there is pip install <module>
to install a module, and if you are using anaconda then conda install <module>
, I believe there would be something similar in windows.
If you are sure that you have installed scipy
module, then probably the python path is not looking for those directories.
You can try a environment variable PYTHONPATH
that has a list of directories to append before launching python prompt. OR you can test it for a session by adding it to sys.path
Upvotes: 2