在anaconda spyder上导入sklearn或nltk或textblob时出错

时间:2018-06-17 13:49:37

标签: python-3.x scikit-learn nltk python-import textblob

我在使用spyder时使用anaconda for python3。 Spyder预装了scipy,sklearn和其他包。就在昨天,我一直在使用textblob和scikit学习,今天我在程序导入时收到错误消息。

这里我在sypder的ipython控制台上导入sklearn:

import sklearn
Traceback (most recent call last):

File "<ipython-input-8-8fd979e02004>", line 1, in <module>
import sklearn

File "C:\Users\Saurav\Anaconda3\lib\site-packages\sklearn\__init__.py", line 57, in <module>
from .base import clone

File "C:\Users\Saurav\Anaconda3\lib\site-packages\sklearn\base.py", line 12, in <module>
from .utils.fixes import signature

File "C:\Users\Saurav\Anaconda3\lib\site-packages\sklearn\utils\__init__.py", line 11, in <module>
from .validation import (as_float_array,

File "C:\Users\Saurav\Anaconda3\lib\site-packages\sklearn\utils\validation.py", line 18, in <module>
from ..utils.fixes import signature

File "C:\Users\Saurav\Anaconda3\lib\site-packages\sklearn\utils\fixes.py", line 403, in <module>
from scipy.stats import rankdata

File "C:\Users\Saurav\Anaconda3\lib\site-packages\scipy\stats\__init__.py", line 344, in <module>
from .stats import *

File "C:\Users\Saurav\Anaconda3\lib\site-packages\scipy\stats\stats.py", line 176, in <module>
from . import distributions

File "C:\Users\Saurav\Anaconda3\lib\site-packages\scipy\stats\distributions.py", line 10, in <module>
from ._distn_infrastructure import (entropy, rv_discrete, rv_continuous,

File "C:\Users\Saurav\Anaconda3\lib\site-packages\scipy\stats\_distn_infrastructure.py", line 43, in <module>
from new import instancemethod

File "<frozen importlib._bootstrap>", line 961, in _find_and_load

File "<frozen importlib._bootstrap>", line 946, in _find_and_load_unlocked

File "<frozen importlib._bootstrap>", line 881, in _find_spec

File "<frozen importlib._bootstrap>", line 855, in _find_spec_legacy

File "C:\Users\Saurav\Anaconda3\lib\site-packages\pyximport\pyximport.py", line 254, in find_module
fp, pathname, (ext,mode,ty) = imp.find_module(fullname,package_path)

File "C:\Users\Saurav\Anaconda3\lib\imp.py", line 270, in find_module
"not {}".format(type(path)))

RuntimeError: 'path' must be None or a list, not <class 
'_frozen_importlib_external._NamespacePath'>

0 个答案:

没有答案