使用KNN进行插入会导致导入错误

时间:2018-01-26 14:55:55

标签: python scikit-learn knn imputation

我正在尝试使用KNN进行估算,但我收到了一个我不知道的错误。

from fancyimpute import KNN

这是错误:

C:\ProgramData\Anaconda3\lib\site-packages\h5py\__init__.py:34: FutureWarning: C
onversion of the second argument of issubdtype from `float` to `np.floating` is
deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type
`.
  from ._conv import register_converters as _register_converters
Using TensorFlow backend.
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tens
orflow_internal.py", line 18, in swig_import_helper
    fp, pathname, description = imp.find_module('_pywrap_tensorflow_internal', [
dirname(__file__)])
  File "C:\ProgramData\Anaconda3\lib\imp.py", line 296, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow_internal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tens
orflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tens
orflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tens
orflow_internal.py", line 20, in swig_import_helper
    import _pywrap_tensorflow_internal
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\ProgramData\Anaconda3\lib\site-packages\fancyimpute\__init__.py", lin
e 7, in <module>
    from .matrix_factorization import MatrixFactorization
  File "C:\ProgramData\Anaconda3\lib\site-packages\fancyimpute\matrix_factorizat
ion.py", line 16, in <module>
    from keras import regularizers
  File "C:\ProgramData\Anaconda3\lib\site-packages\keras\__init__.py", line 3, i
n <module>
    from . import utils
  File "C:\ProgramData\Anaconda3\lib\site-packages\keras\utils\__init__.py", lin
e 6, in <module>
    from . import conv_utils
  File "C:\ProgramData\Anaconda3\lib\site-packages\keras\utils\conv_utils.py", l
ine 9, in <module>
    from .. import backend as K
  File "C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\__init__.py", l
ine 83, in <module>
    from .tensorflow_backend import *
  File "C:\ProgramData\Anaconda3\lib\site-packages\keras\backend\tensorflow_back
end.py", line 5, in <module>
    import tensorflow as tf
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\__init__.py", line
 24, in <module>
    from tensorflow.python import *
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\__init__.py
", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tens
orflow.py", line 72, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tens
orflow_internal.py", line 18, in swig_import_helper
    fp, pathname, description = imp.find_module('_pywrap_tensorflow_internal', [
dirname(__file__)])
  File "C:\ProgramData\Anaconda3\lib\imp.py", line 296, in find_module
    raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named '_pywrap_tensorflow_internal'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tens
orflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tens
orflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\pywrap_tens
orflow_internal.py", line 20, in swig_import_helper
    import _pywrap_tensorflow_internal
ModuleNotFoundError: No module named '_pywrap_tensorflow_internal'


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/install_sources#common_installation_probl
ems

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.
>>>

0 个答案:

没有答案