无法导入名称“类型”

时间:2020-05-04 10:39:41

标签: python scikit-learn

我想知道这个错误是关于什么的。 使用此lib运行小脚本后,它会弹出->

from sklearn.feature_extraction.text import TfidfVectorizer

Traceback (most recent call last):
  File "C:/Users/migue/PycharmProjects/research4me/tfidf.py", line 17, in <module>
    getUniqueWords(text)
  File "C:/Users/migue/PycharmProjects/research4me/tfidf.py", line 3, in getUniqueWords
    from sklearn.feature_extraction.text import TfidfVectorizer
  File "C:\Users\migue\PycharmProjects\research4me\venv\lib\site-packages\sklearn\__init__.py", line 82, in <module>
    from .base import clone
  File "C:\Users\migue\PycharmProjects\research4me\venv\lib\site-packages\sklearn\base.py", line 20, in <module>
    from .utils import _IS_32BIT
  File "C:\Users\migue\PycharmProjects\research4me\venv\lib\site-packages\sklearn\utils\__init__.py", line 20, in <module>
    from scipy.sparse import issparse
  File "C:\Users\migue\PycharmProjects\research4me\venv\lib\site-packages\scipy\__init__.py", line 156, in <module>
    from . import fft
  File "C:\Users\migue\PycharmProjects\research4me\venv\lib\site-packages\scipy\fft\__init__.py", line 76, in <module>
    from ._basic import (
  File "C:\Users\migue\PycharmProjects\research4me\venv\lib\site-packages\scipy\fft\_basic.py", line 1, in <module>
    from scipy._lib.uarray import generate_multimethod, Dispatchable
  File "C:\Users\migue\PycharmProjects\research4me\venv\lib\site-packages\scipy\_lib\uarray.py", line 27, in <module>
    from ._uarray import *
  File "C:\Users\migue\PycharmProjects\research4me\venv\lib\site-packages\scipy\_lib\_uarray\__init__.py", line 114, in <module>
    from ._backend import *
  File "C:\Users\migue\PycharmProjects\research4me\venv\lib\site-packages\scipy\_lib\_uarray\_backend.py", line 1, in <module>
    from typing import (
ImportError: cannot import name 'Type'

0 个答案:

没有答案