Fancyimpute download
petcoding opened this issue · 8 comments
When I download the fancyimpute package through the Anaconda prompt window and import fancyimpute as KNN, I get the following error message. Not sure what's causing this as I've been having trouble downloading this package. Any help is appreciated.
ImportError Traceback (most recent call last)
in ()
----> 1 from fancyimpute import KNN
build\bdist.win-amd64\egg\fancyimpute_init_.py in ()
build\bdist.win-amd64\egg\fancyimpute\matrix_factorization.py in ()
C:\Users\belyadih\AppData\Local\Continuum\anaconda2\lib\site-packages\keras_init_.py in ()
1 from future import absolute_import
2
----> 3 from . import utils
4 from . import activations
5 from . import applications
C:\Users\belyadih\AppData\Local\Continuum\anaconda2\lib\site-packages\keras\utils_init_.py in ()
1 from future import absolute_import
----> 2 from . import np_utils
3 from . import generic_utils
4 from . import data_utils
5 from . import io_utils
ImportError: cannot import name np_utils
There's a requirements file in the main directory. I recommend you uninstall the version you have now and try pip install fancyimpute
. It should automatically install the dependencies.
I did uninstall and reinstalled the fancyimpute package but I still get the same error. Not sure what I am missing.
Hmm. Not sure. This file has all the requirements: https://github.com/iskandr/fancyimpute/blob/master/requirements.txt
And usually when you do pip install fancyimpute
it should also install all the dependencies. You can try to install np_utils
separately: pip install np-utils
Oh maybe I'm wrong here. It looks like keras
wants to use np_utils
? What version of keras
do you have?
So, I did check and I already have np-utils installed. As for Keras, When I tried to get the version of Keras that I am using by typing the below code in Jupyter, I get another error message as shown below.
from tensorflow.python import keras
print(keras.version)
ImportError Traceback (most recent call last)
in ()
----> 1 from tensorflow.python import keras
2 print(keras.version)
C:\Users\belyadih\AppData\Local\Continuum\anaconda2\lib\site-packages\tensorflow_init_.py in ()
22
23 # pylint: disable=wildcard-import
---> 24 from tensorflow.python import *
25 # pylint: enable=wildcard-import
26
C:\Users\belyadih\AppData\Local\Continuum\anaconda2\lib\site-packages\tensorflow\python_init_.py in ()
49 import numpy as np
50
---> 51 from tensorflow.python import pywrap_tensorflow
52
53 # Protocol buffers
C:\Users\belyadih\AppData\Local\Continuum\anaconda2\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in ()
50 for some common reasons and solutions. Include the entire stack trace
51 above this error message when asking for help.""" % traceback.format_exc()
---> 52 raise ImportError(msg)
53
54 # pylint: enable=wildcard-import,g-import-not-at-top,unused-import,line-too-long
ImportError: Traceback (most recent call last):
File "C:\Users\belyadih\AppData\Local\Continuum\anaconda2\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 41, in
from tensorflow.python.pywrap_tensorflow_internal import *
File "C:\Users\belyadih\AppData\Local\Continuum\anaconda2\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in
_pywrap_tensorflow_internal = swig_import_helper()
File "C:\Users\belyadih\AppData\Local\Continuum\anaconda2\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 20, in swig_import_helper
import _pywrap_tensorflow_internal
ImportError: No module named _pywrap_tensorflow_internal
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions. Include the entire stack trace
above this error message when asking for help.
OK, so you a have keras/tensorflow problem. We can't really help there. Once you can do import keras
and import tensorflow
without issue, then fancyimpute will work. Sorry!