iskandr/fancyimpute

Fancyimpute Error

irwinmier96 opened this issue · 1 comments

Hi, I'm trying to pip install fancyimpute on Bash so I can use the MICE feature but this is the error I get.

Irwin@DESKTOP-H7L1CVU MINGW64 ~
$ cd Desktop/

Irwin@DESKTOP-H7L1CVU MINGW64 ~/Desktop
$ pip install fancyimpute
Requirement already satisfied: fancyimpute in c:\users\irwin\anaconda\anaconda3\lib\site-packages\fancyimpute-0.5.4-py3.7.egg (0.5.4)
Requirement already satisfied: knnimpute in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from fancyimpute) (0.1.0)
Requirement already satisfied: numpy>=1.10 in c:\users\irwin\appdata\roaming\python\python37\site-packages (from fancyimpute) (1.18.4)
Requirement already satisfied: scipy in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from fancyimpute) (1.1.0)
Requirement already satisfied: cvxpy>=1.0.6 in c:\users\irwin\anaconda\anaconda3\lib\site-packages\cvxpy-1.1.0a4-py3.7-win-amd64.egg (from fancyimpute) (1.1.0a4)
Requirement already satisfied: scikit-learn>=0.21.2 in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from fancyimpute) (0.22.2.post1)
Requirement already satisfied: keras>=2.0.0 in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from fancyimpute) (2.2.4)
Requirement already satisfied: tensorflow in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from fancyimpute) (1.14.0)
Requirement already satisfied: six in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from knnimpute->fancyimpute) (1.12.0)
Collecting ecos>=2 (from cvxpy>=1.0.6->fancyimpute)
Using cached https://files.pythonhosted.org/packages/b9/3a/59aa93b573a22fda44402383aeddcc2a081c31e61080af3da9d11855c77a/ecos-2.0.7.post1.tar.gz
Requirement already satisfied: osqp>=0.4.1 in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from cvxpy>=1.0.6->fancyimpute) (0.6.1)
Collecting scs>=1.1.3 (from cvxpy>=1.0.6->fancyimpute)
Using cached https://files.pythonhosted.org/packages/1a/72/33be87cce255d4e9dbbfef547e9fd6ec7ee94d0d0910bb2b13badea3fbbe/scs-2.1.2.tar.gz
Requirement already satisfied: joblib>=0.11 in c:\users\irwin\anaconda\anaconda3\lib\site-packages\joblib-0.14.1-py3.7.egg (from scikit-learn>=0.21.2->fancyimpute) (0.14.1)
Requirement already satisfied: pyyaml in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from keras>=2.0.0->fancyimpute) (3.13)
Requirement already satisfied: h5py in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from keras>=2.0.0->fancyimpute) (2.8.0)
Requirement already satisfied: keras-preprocessing>=1.0.5 in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from keras>=2.0.0->fancyimpute) (1.1.0)
Requirement already satisfied: keras-applications>=1.0.6 in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from keras>=2.0.0->fancyimpute) (1.0.8)
Requirement already satisfied: tensorflow-estimator<1.15.0rc0,>=1.14.0rc0 in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from tensorflow->fancyimpute) (1.14.0)
Requirement already satisfied: termcolor>=1.1.0 in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from tensorflow->fancyimpute) (1.1.0)
Requirement already satisfied: wrapt>=1.11.1 in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from tensorflow->fancyimpute) (1.11.2)
Requirement already satisfied: astor>=0.6.0 in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from tensorflow->fancyimpute) (0.8.0)
Requirement already satisfied: tensorboard<1.15.0,>=1.14.0 in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from tensorflow->fancyimpute) (1.14.0)
Requirement already satisfied: absl-py>=0.7.0 in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from tensorflow->fancyimpute) (0.7.1)
Requirement already satisfied: wheel>=0.26 in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from tensorflow->fancyimpute) (0.32.3)
Requirement already satisfied: gast>=0.2.0 in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from tensorflow->fancyimpute) (0.2.2)
Requirement already satisfied: protobuf>=3.6.1 in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from tensorflow->fancyimpute) (3.8.0)
Requirement already satisfied: google-pasta>=0.1.6 in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from tensorflow->fancyimpute) (0.1.7)
Requirement already satisfied: grpcio>=1.8.6 in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from tensorflow->fancyimpute) (1.21.1)
Requirement already satisfied: future in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from osqp>=0.4.1->cvxpy>=1.0.6->fancyimpute) (0.17.1)
Requirement already satisfied: markdown>=2.6.8 in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from tensorboard<1.15.0,>=1.14.0->tensorflow->fancyimpute) (3.1.1)
Requirement already satisfied: werkzeug>=0.11.15 in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from tensorboard<1.15.0,>=1.14.0->tensorflow->fancyimpute) (0.14.1)
Requirement already satisfied: setuptools>=41.0.0 in c:\users\irwin\anaconda\anaconda3\lib\site-packages (from tensorboard<1.15.0,>=1.14.0->tensorflow->fancyimpute) (41.0.1)
Building wheels for collected packages: ecos, scs
Running setup.py bdist_wheel for ecos ... error
Complete output from command C:\Users\Irwin\anaconda\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Irwin\AppData\Local\Temp\pip-install-yp60s4al\ecos\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d C:\Users\Irwin\AppData\Local\Temp\pip-wheel-zlm7h2gh --python-tag cp37:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\ecos
copying src\ecos\ecos.py -> build\lib.win-amd64-3.7\ecos
copying src\ecos\version.py -> build\lib.win-amd64-3.7\ecos
copying src\ecos_init_.py -> build\lib.win-amd64-3.7\ecos
running build_ext
building '_ecos' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/


Failed building wheel for ecos
Running setup.py clean for ecos
Running setup.py bdist_wheel for scs ... error
Complete output from command C:\Users\Irwin\anaconda\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Irwin\AppData\Local\Temp\pip-install-yp60s4al\scs\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d C:\Users\Irwin\AppData\Local\Temp\pip-wheel-dm8yiw9c --python-tag cp37:
Namespace(blas64=False, extraverbose=False, float32=False, gpu=False, int32=False, scs=False)
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\scs
copying src_init_.py -> build\lib.win-amd64-3.7\scs
running build_ext
blas_mkl_info:
NOT AVAILABLE
blis_info:
NOT AVAILABLE
openblas_info:
library_dirs = ['C:\projects\numpy-wheels\numpy\build\openblas_info']
libraries = ['openblas_info']
language = f77
define_macros = [('HAVE_CBLAS', None)]
blas_opt_info:
library_dirs = ['C:\projects\numpy-wheels\numpy\build\openblas_info']
libraries = ['openblas_info']
language = f77
define_macros = [('HAVE_CBLAS', None)]
lapack_mkl_info:
NOT AVAILABLE
openblas_lapack_info:
library_dirs = ['C:\projects\numpy-wheels\numpy\build\openblas_lapack_info']
libraries = ['openblas_lapack_info']
language = f77
define_macros = [('HAVE_CBLAS', None)]
lapack_opt_info:
library_dirs = ['C:\projects\numpy-wheels\numpy\build\openblas_lapack_info']
libraries = ['openblas_lapack_info']
language = f77
define_macros = [('HAVE_CBLAS', None)]
Could not locate executable g77
Could not locate executable f77
Could not locate executable ifort
Could not locate executable ifl
Could not locate executable f90
Could not locate executable efl
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable g95
Could not locate executable efort
Could not locate executable efc
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
C:\Users\Irwin\AppData\Roaming\Python\Python37\site-packages\numpy\distutils\system_info.py:1896: UserWarning:
Optimized (vendor) Blas libraries are not found.
Falls back to netlib Blas library which has worse performance.
A better performance should be easily gained by switching
Blas library.
if self._calc_info(blas):
C:\Users\Irwin\AppData\Roaming\Python\Python37\site-packages\numpy\distutils\system_info.py:1896: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
if self._calc_info(blas):
C:\Users\Irwin\AppData\Roaming\Python\Python37\site-packages\numpy\distutils\system_info.py:1896: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
if self._calc_info(blas):
C:\Users\Irwin\AppData\Roaming\Python\Python37\site-packages\numpy\distutils\system_info.py:1730: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
return getattr(self, 'calc_info{}'.format(name))()
C:\Users\Irwin\AppData\Roaming\Python\Python37\site-packages\numpy\distutils\system_info.py:1730: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
return getattr(self, 'calc_info{}'.format(name))()
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
{}
{}


Failed building wheel for scs
Running setup.py clean for scs
Failed to build ecos scs
Installing collected packages: ecos, scs
Running setup.py install for ecos ... error
Complete output from command C:\Users\Irwin\anaconda\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Irwin\AppData\Local\Temp\pip-install-yp60s4al\ecos\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\Irwin\AppData\Local\Temp\pip-record-lbl1_mn0\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.7
creating build\lib.win-amd64-3.7\ecos
copying src\ecos\ecos.py -> build\lib.win-amd64-3.7\ecos
copying src\ecos\version.py -> build\lib.win-amd64-3.7\ecos
copying src\ecos_init_.py -> build\lib.win-amd64-3.7\ecos
running build_ext
building '_ecos' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

----------------------------------------

Command "C:\Users\Irwin\anaconda\Anaconda3\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Irwin\AppData\Local\Temp\pip-install-yp60s4al\ecos\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\Irwin\AppData\Local\Temp\pip-record-lbl1_mn0\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Irwin\AppData\Local\Temp\pip-install-yp60s4al\ecos\

Can someone please tell me how to fix these errors? I can't seem to figure out what to do here.

Looks like you're on windows and cvxpy is having trouble installing. You could try doing what it says here: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

Also you don't need fancyimpute for MICE anymore. It's been merged into scikit-learn: https://scikit-learn.org/stable/modules/generated/sklearn.impute.IterativeImputer.html