Visual C++ 10.0 Issue When Installing Python Module; Cl.exe Failed With Exit Status 2 (h5py)
I've been at this for the last 5 hours or so. I've reinstalled a bunch, but essentially I'm trying to install the Python module h5py on a Windows 8.1 machine running Python 3.4.1.
Solution 1:
OK! So I did it.
Here's how:
- I uninstalled all Python versions and deleted all Python-related files, folders, etc. (included PATH variables and packages).
- I uninstalled all Microsoft Visual Studio C++ 2010 Redistributable, Microsoft Windows SDK for Windows 7, and .NET Framework 4 programs (BE CAREFUL WITH THIS. If you just do the correct files, then you will be fine. I uninstalled other Microsoft programs and ran into several registry errors...).
- Reinstall Microsoft Windows SDK for Windows 7 and .NET Framework 4.
- Reinstall Microsoft Visual C++ 2010 Redistributable Package (x64).
- Reinstall Microsoft Visual C++ 2010 Service Pack 1 Compiler Update for the Windows SDK 7.1.
- Reinstall Python 3.4.0 (to
C:\Python34
). - Add
C:\Python34
andC:\Python34\Scripts
to the PATH system variable. - Download H5py from this website here (specifically
h5py-2.6.0-cp34-cp34m-win_amd64.whl
). - Run
pip3 install h5py-2.6.0-cp34-cp34m-win_amd64.whl
. This will generate the following:
Processing c:\python34\h5py-2.6.0-cp34-cp34m-win_amd64.whl
Collecting numpy>=1.6.1 (from h5py==2.6.0)
Downloading numpy-1.11.1-cp34-none-win_amd64.whl (7.4MB)
100% |################################| 7.4MB 46kB/s
Collecting six (from h5py==2.6.0)
Using cached six-1.10.0-py2.py3-none-any.whl
Installing collected packages: numpy, six, h5py
Successfully installed h5py-2.6.0 numpy-1.11.1 six-1.10.0
Next I ran my program to make sure the import worked correctly, and it did! I hope this helps anyone trying this, just be VERY careful with step (2).
Solution 2:
I had the same problem trying to install from the command prompt on my Windows 10 machine. To bypass this error:
- I manually downloaded the application from website
- Extracted it to my C:/"Path where you want to setup the application"
- Went back into command prompt open up the path where you just extracted the application
- Run the setup file in the downloaded package from there.
It worked me!!!
Cheers
Post a Comment for "Visual C++ 10.0 Issue When Installing Python Module; Cl.exe Failed With Exit Status 2 (h5py)"