5

I was trying to install fancyimpute library on my Windows system. I am using Spyder on the Anaconda Navigator. I have tried the following on the command prompt as Administrator, still it shows

ModuleNotFoundError: No module named 'fancyimpute'

conda install -c https://conda.binstar.org/eswears cvxopt
pip install keras
pip install fancyimpute
Also installed Visual C++ Compiler for Python 2.7
I am using Python 3.6.1

Kindly help :)

Anand Zutshi
  • 125
  • 1
  • 3
  • 11
  • A different idea could be to use docker to construct exactly the python environment you want. Specifically I had some problem with airflow and xgboost. But with docker it was quite easy to run both. – Quickbeam2k1 Aug 18 '17 at 18:32
  • For those Who try MyopicVisage's solution and run into this error: cannot run rc.exe, This is the solution: https://stackoverflow.com/questions/35215971/lnk1158-cannot-run-rc-exe-x64-visual-studio – LR_RL May 05 '19 at 19:50
  • Does this answer your question? [PackagesNotFoundError: The following packages are not available from current channels:](https://stackoverflow.com/questions/48493505/packagesnotfounderror-the-following-packages-are-not-available-from-current-cha) – AMC Feb 27 '20 at 18:06

7 Answers7

6

Thanks MyopicVisage. Your suggestion worked for me with a minor change as below.

conda install ecos  
conda install CVXcanon  
pip install fancyimpute  
Pang
  • 9,564
  • 146
  • 81
  • 122
Regi Mathew
  • 2,603
  • 3
  • 24
  • 38
2

I found installing the dependent libraries with conda would allow you to install fancyimpute. Specifically, I had to install ecos and CVXcanon; you may need to install others, do so in the order of the warning messages.

Use the commands in the command prompt:

conda install ecos  

conda install CVXcanon  

conda install fancyimpute  
MyopicVisage
  • 1,333
  • 1
  • 19
  • 33
2

This is how I solved this problem in my laptop. First install MS Build tool Visual Studio Studio Build Tools requires about 3 GB of disk space. After installation of visual studio installer, look for the required version of C++ compiler (in our case its 14.0.xxx) Install that version which will download a file of 900 MB and requires a space of 3GB around in the Hard disk. After installation, restart the computer. Then go to conda prompt and give these commands

conda update --all
conda create -n py36 python=3.6 anaconda
conda activate 
conda install ecos
conda install CVXcanon
conda install -c cvxgrp scs
conda install scs
pip install fancyimpute

Another reference to do this, Unable to install fancyimpute in Python (for Windows 10)

If there's any error regarding "wrapt" , just go through this https://github.com/tensorflow/tensorflow/issues/30191 After this you might need to reinstall sklearn and jiblib lilbraries again

pip  uninstall sklearn
pip uninstall jiblib
pip  install sklearn
pip install jiblib
1

you can do pip install fancyimpute-0.0.4.tar.gz to install the package after downloading fancyimpute-0.0.4.tar.gz.

Harshit Mehta
  • 328
  • 1
  • 2
  • 11
1

For those of you that couldn't get it working with other solutions, here is what I did. First:

conda install ecos

Then I went and downloaded the build wheel for both scs and cvxpy.

To install a build wheel, all I did was navigate to the folder (in my case, in the anaconda prompt it was just cd downloads). Secondly, I ran the following commands, in order:

pip install scs-2.1.0-cp36-cp36m-win_amd64.whl
pip install cvxpy-1.0.22-cp36-cp36m-win_amd64.whl

Then at last I could do

pip install fancyimpute

Side Note: that you can also copy paste the path to the file, pip just needs to know where it is:

pip install C:\Users\<USERNAME>\Downloads\scs-2.1.0-cp36-cp36m-win_amd64.whl
pip install C:\Users\<USERNAME>\Downloads\cvxpy-1.0.22-cp36-cp36m-win_amd64.whl
Casper Hansen
  • 443
  • 3
  • 10
0

First you have to install Tensorflow and You have to follow the instruction provided in https://www.tensorflow.org/install/pip

And then you can install below

  1. conda install ecos
  2. conda install CVXcanon
  3. conda install fancyimpute

(you can install using pip too)

Rinku
  • 1
  • 4
0

In my case (Python 3.7.4 with Windows 10), the solution I came out with is the combination of this answer (by Pang and Regi Mathew),

conda install ecos
conda install CVXcanon
pip install fancyimpute

and this other answer I found in this other question (by Nick):

easy_install fancyimpute

Therefore:

conda install ecos
conda install CVXcanon
pip install fancyimpute
easy_install fancyimpute
Gian Arauz
  • 423
  • 1
  • 7
  • 14
  • Isn't `easy_install fancyimpute` supposed to replace `pip install fancyimpute` ? – AMC Feb 27 '20 at 18:08
  • Hi AMC. When I gave this answer, `easy_install` worked fine. I don't know if `pip install` should be preferable than `easy_install`, I'm sorry. This `easy_install` solution was originally proposed by [Nick](https://stackoverflow.com/users/9419014/nick) in this [link](https://stackoverflow.com/questions/50746854/unable-to-install-fancyimpute-in-python-for-windows-10). I'm sure he has more knowledge that me and he can help you. – Gian Arauz Feb 29 '20 at 10:33