Windows10+Python3.7 64位下fancyimpute安装失败求助
Hey there, let's sort out this frustrating installation issue you're hitting. The errors you're seeing—like missing corecrt.h during compilation of cvxpy, ecos, and scs—happen because your Visual Studio 2017 setup is missing critical C++ build components required to compile these dependencies. Here are a few reliable fixes to get fancyimpute installed:
Option 1: Use Conda-Forge (Easiest Approach)
If you have Anaconda/miniconda set up, this is the simplest way to avoid compilation entirely. The conda-forge channel provides pre-built packages for fancyimpute and all its dependencies:
conda install -c conda-forge fancyimpute
This will handle all dependencies automatically, no manual compilation needed.
Option 2: Fix Visual Studio C++ Build Tools
If you prefer using pip, you'll need to ensure your Visual Studio has the right components to compile the required packages:
- Open the Visual Studio Installer and locate your 2017 Enterprise installation. Click "Modify".
- Make sure the Desktop development with C++ workload is selected.
- Under the "Installation details" pane for this workload, verify that Windows Universal CRT SDK is checked (this is where
corecrt.hcomes from). - Click "Modify" to install the missing components, then restart your computer.
- After restarting, try installing fancyimpute again with:
pip install fancyimpute
Option 3: Install Pre-Built Wheels (Avoid Compilation)
If fixing Visual Studio feels too involved, you can download pre-compiled wheel files for the problematic dependencies (cvxpy, ecos, scs) and install them manually:
- Download the correct wheel files for Python 3.7 (64-bit Windows) (look for files ending with
cp37-win_amd64.whl). - Install each wheel using pip before installing fancyimpute:
pip install path\to\cvxpy-1.0.25-cp37-win_amd64.whl pip install path\to\ecos-2.0.7.post1-cp37-win_amd64.whl pip install path\to\scs-2.1.1-cp37-win_amd64.whl - Once those are installed, run:
pip install fancyimpute
Any of these methods should resolve the compilation errors and get fancyimpute installed successfully.
内容的提问来源于stack exchange,提问作者mayaaa

