在 Windows 7 从源代码安装 Sklearn

Installing Sklearn from Source on Windows 7

我在 Windows 7(64 位)上安装了 Python 3.4 以及 sklearn python 包 [NumPy (>= 1.6. 1), SciPy (>= 0.9)]。我从网上找到的匹配 python 3.4 的 .whl 文件安装了 Numpy 和 SciPy。我正在尝试通过调用 pip install sklearn 来安装 sklearn 包(仅供参考,我正在尝试不使用 Python(x.y)进行此安装,因为我想要 python 3.x). pip install sklearn 命令将 运行 一段时间,但随后出现以下错误:

copying sklearn\tests\__init__.py -> build\lib.win-amd64-3.4\sklearn\tests
running build_clib
customize MSVCCompiler
Missing compiler_cxx fix for MSVCCompiler
customize MSVCCompiler using build_clib
building 'libsvm-skl' library
compiling C sources
error: Microsoft Visual C++ 10.0 is required. Get it with "Microsoft Windows   SDK 7.1": www.microsoft.com/download/details.aspx?id=8279

----------------------------------------
Command "c:\python34\python.exe -u -c "import setuptools, tokenize;__file__='C:\Users\jjaaae\AppData\Local\Temp\pip-build-43xaawp2\scikit-learn\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\jjaaae\AppData\Local\Temp\pip-7i3ghuri-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\jjaaae\AppData\Local\Temp\pip-build-43xaawp2\scikit-learn\

我已尝试按照错误消息中的说明安装 Microsoft Windows SDK 7.1。我还重新启动了命令提示符和我的计算机,但我仍然收到此错误消息。我错过了什么?

我发现了问题。 Microsoft Windows SDK 7.1 的下载文件允许您 "install" 即使您尚未安装 .Net 4.x。我一定是在安装过程中点击得很开心而错过了那个警告。所以 SDK 7.1 的安装非常快,没有安装我需要的东西。当我备份时,首先从 this URL 安装 Microsoft .NET Framework 4,然后按照它的工作说明安装 SDK 7.1。