问题描述
我已经过去了大约5个小时.我已经重新安装了一大堆,但实际上我试图在运行Python 3.4.1的Windows 8.1计算机上安装Python模块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.
堆栈如下:
Collecting h5py
Using cached h5py-2.6.0.tar.gz
Requirement already satisfied (use --upgrade to upgrade): numpy>=1.6.1 in c:\python34\lib\site-packages (from h5py)
Requirement already satisfied (use --upgrade to upgrade): six in c:\python34\lib\site-packages (from h5py)
Building wheels for collected packages: h5py
Running setup.py bdist_wheel for h5py: started
Running setup.py bdist_wheel for h5py: finished with status 'error'
Complete output from command C:\Python34\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\pip-build-bw8g_xls\\h5py\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d C:\Users\CHARLE~1\AppData\Local\Temp\tmpbpg7zmwapip-wheel- --python-tag cp34:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win32-3.4
creating build\lib.win32-3.4\h5py
copying h5py\highlevel.py -> build\lib.win32-3.4\h5py
copying h5py\ipy_completer.py -> build\lib.win32-3.4\h5py
copying h5py\version.py -> build\lib.win32-3.4\h5py
copying h5py\__init__.py -> build\lib.win32-3.4\h5py
creating build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\attrs.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\base.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\dataset.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\datatype.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\dims.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\files.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\filters.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\group.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\selections.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\selections2.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\__init__.py -> build\lib.win32-3.4\h5py\_hl
creating build\lib.win32-3.4\h5py\tests
copying h5py\tests\common.py -> build\lib.win32-3.4\h5py\tests
copying h5py\tests\__init__.py -> build\lib.win32-3.4\h5py\tests
creating build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\common.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_attrs.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_attrs_data.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_base.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_dataset.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_datatype.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_dimension_scales.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_file.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_group.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_h5.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_h5f.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_h5p.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_h5t.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_objects.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_selections.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_slicing.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\__init__.py -> build\lib.win32-3.4\h5py\tests\old
creating build\lib.win32-3.4\h5py\tests\hl
copying h5py\tests\hl\test_attribute_create.py -> build\lib.win32-3.4\h5py\tests\hl
copying h5py\tests\hl\test_dataset_getitem.py -> build\lib.win32-3.4\h5py\tests\hl
copying h5py\tests\hl\test_dataset_swmr.py -> build\lib.win32-3.4\h5py\tests\hl
copying h5py\tests\hl\test_datatype.py -> build\lib.win32-3.4\h5py\tests\hl
copying h5py\tests\hl\test_dims_dimensionproxy.py -> build\lib.win32-3.4\h5py\tests\hl
copying h5py\tests\hl\test_file.py -> build\lib.win32-3.4\h5py\tests\hl
copying h5py\tests\hl\test_threads.py -> build\lib.win32-3.4\h5py\tests\hl
copying h5py\tests\hl\__init__.py -> build\lib.win32-3.4\h5py\tests\hl
running build_ext
Autodetection skipped [[WinError 126] The specified module could not be found]
********************************************************************************
Summary of the h5py configuration
Path to HDF5: None
HDF5 Version: '1.8.4'
MPI Enabled: False
Rebuild Required: False
********************************************************************************
Executing api_gen rebuild of defs
Executing cythonize()
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\defs.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\_errors.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\_objects.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\_proxy.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5fd.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5z.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5i.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5r.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\utils.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\_conv.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5t.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5s.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5p.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5d.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5a.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5f.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5g.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5l.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5o.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5ds.pyx because it changed.
Compiling c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5ac.pyx because it changed.
[ 1/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\_conv.pyx
[ 2/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\_errors.pyx
[ 3/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\_objects.pyx
[ 4/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\_proxy.pyx
[ 5/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\defs.pyx
[ 6/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5.pyx
[ 7/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5a.pyx
[ 8/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5ac.pyx
[ 9/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5d.pyx
[10/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5ds.pyx
[11/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5f.pyx
[12/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5fd.pyx
[13/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5g.pyx
[14/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5i.pyx
[15/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5l.pyx
[16/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5o.pyx
[17/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5p.pyx
[18/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5r.pyx
[19/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5s.pyx
[20/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5t.pyx
[21/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\h5z.pyx
[22/22] Cythonizing c:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\utils.pyx
building 'h5py.defs' extension
creating build\temp.win32-3.4
creating build\temp.win32-3.4\Release
creating build\temp.win32-3.4\Release\users
creating build\temp.win32-3.4\Release\users\charle~1
creating build\temp.win32-3.4\Release\users\charle~1\appdata
creating build\temp.win32-3.4\Release\users\charle~1\appdata\local
creating build\temp.win32-3.4\Release\users\charle~1\appdata\local\temp
creating build\temp.win32-3.4\Release\users\charle~1\appdata\local\temp\pip-build-bw8g_xls
creating build\temp.win32-3.4\Release\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py
creating build\temp.win32-3.4\Release\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DH5_USE_16_API -D_HDF5USEDLL_ -Ic:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\lzf -Ic:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\windows -IC:\Python34\lib\site-packages\numpy\core\include -IC:\Python34\include -IC:\Python34\include /Tcc:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\defs.c /Fobuild\temp.win32-3.4\Release\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\defs.obj
defs.c
c:\python34\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
c:\users\charles kronk\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\api_compat.h(27) : fatal error C1083: Cannot open include file: 'hdf5.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2
----------------------------------------
Running setup.py clean for h5py
Failed to build h5py
Installing collected packages: h5py
Running setup.py install for h5py: started
Running setup.py install for h5py: finished with status 'error'
Complete output from command C:\Python34\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\pip-build-bw8g_xls\\h5py\\setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\CHARLE~1\AppData\Local\Temp\pip-fis5451x-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win32-3.4
creating build\lib.win32-3.4\h5py
copying h5py\highlevel.py -> build\lib.win32-3.4\h5py
copying h5py\ipy_completer.py -> build\lib.win32-3.4\h5py
copying h5py\version.py -> build\lib.win32-3.4\h5py
copying h5py\__init__.py -> build\lib.win32-3.4\h5py
creating build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\attrs.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\base.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\dataset.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\datatype.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\dims.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\files.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\filters.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\group.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\selections.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\selections2.py -> build\lib.win32-3.4\h5py\_hl
copying h5py\_hl\__init__.py -> build\lib.win32-3.4\h5py\_hl
creating build\lib.win32-3.4\h5py\tests
copying h5py\tests\common.py -> build\lib.win32-3.4\h5py\tests
copying h5py\tests\__init__.py -> build\lib.win32-3.4\h5py\tests
creating build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\common.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_attrs.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_attrs_data.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_base.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_dataset.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_datatype.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_dimension_scales.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_file.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_group.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_h5.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_h5f.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_h5p.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_h5t.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_objects.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_selections.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\test_slicing.py -> build\lib.win32-3.4\h5py\tests\old
copying h5py\tests\old\__init__.py -> build\lib.win32-3.4\h5py\tests\old
creating build\lib.win32-3.4\h5py\tests\hl
copying h5py\tests\hl\test_attribute_create.py -> build\lib.win32-3.4\h5py\tests\hl
copying h5py\tests\hl\test_dataset_getitem.py -> build\lib.win32-3.4\h5py\tests\hl
copying h5py\tests\hl\test_dataset_swmr.py -> build\lib.win32-3.4\h5py\tests\hl
copying h5py\tests\hl\test_datatype.py -> build\lib.win32-3.4\h5py\tests\hl
copying h5py\tests\hl\test_dims_dimensionproxy.py -> build\lib.win32-3.4\h5py\tests\hl
copying h5py\tests\hl\test_file.py -> build\lib.win32-3.4\h5py\tests\hl
copying h5py\tests\hl\test_threads.py -> build\lib.win32-3.4\h5py\tests\hl
copying h5py\tests\hl\__init__.py -> build\lib.win32-3.4\h5py\tests\hl
running build_ext
Autodetection skipped [[WinError 126] The specified module could not be found]
********************************************************************************
Summary of the h5py configuration
Path to HDF5: None
HDF5 Version: '1.8.4'
MPI Enabled: False
Rebuild Required: False
********************************************************************************
Executing cythonize()
building 'h5py.defs' extension
creating build\temp.win32-3.4
creating build\temp.win32-3.4\Release
creating build\temp.win32-3.4\Release\users
creating build\temp.win32-3.4\Release\users\charle~1
creating build\temp.win32-3.4\Release\users\charle~1\appdata
creating build\temp.win32-3.4\Release\users\charle~1\appdata\local
creating build\temp.win32-3.4\Release\users\charle~1\appdata\local\temp
creating build\temp.win32-3.4\Release\users\charle~1\appdata\local\temp\pip-build-bw8g_xls
creating build\temp.win32-3.4\Release\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py
creating build\temp.win32-3.4\Release\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -DH5_USE_16_API -D_HDF5USEDLL_ -Ic:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\lzf -Ic:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\windows -IC:\Python34\lib\site-packages\numpy\core\include -IC:\Python34\include -IC:\Python34\include /Tcc:\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\defs.c /Fobuild\temp.win32-3.4\Release\users\charle~1\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\defs.obj
defs.c
c:\python34\lib\site-packages\numpy\core\include\numpy\npy_1_7_deprecated_api.h(12) : Warning Msg: Using deprecated NumPy API, disable it by #defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
c:\users\charles kronk\appdata\local\temp\pip-build-bw8g_xls\h5py\h5py\api_compat.h(27) : fatal error C1083: Cannot open include file: 'hdf5.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\cl.exe' failed with exit status 2
----------------------------------------
此外,打印到命令行的错误是:
Further, the error printed to the command line is:
←[31m Failed building wheel for h5py←[0m
←[31mCommand "C:\Python34\python.exe -u -c "import setuptools, tokenize;__file__
='C:\\Users\\CHARLE~1\\AppData\\Local\\Temp\\pip-build-bw8g_xls\\h5py\\setup.py'
;exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '
\n'), __file__, 'exec'))" install --record C:\Users\CHARLE~1\AppData\Local\Temp\
pip-fis5451x-record\install-record.txt --single-version-externally-managed --com
pile" failed with error code 1 in C:\Users\CHARLE~1\AppData\Local\Temp\pip-build
-bw8g_xls\h5py\←[0m
到目前为止我已经尝试过的事情:
Things I've tried so far:
- 卸载并重新安装Microsoft Visual Studio 10.0.
- 安装Windows SDK 7.1.
- 安装MySQL Connector C 6.0.2并将其mklink到程序文件(x86)中.
- 通过pip和easy_install运行.两次都出现相同的错误.
- 安装其他模块.到目前为止,我无法重复该错误.
-
pip wheel h5py
在同一堆栈上失败. - 我检查了
vcvarsall.bat
,它似乎具有正确的配置(CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
)
- Uninstalling and reinstalling Microsoft Visual Studio 10.0.
- Installing Windows SDK 7.1.
- Installing MySQL Connector C 6.0.2 and mklinking it in Program Files (x86).
- Running with pip and easy_install. The same error results both times.
- Installing other modules. I can't repeat the error thus far.
pip wheel h5py
fails on the same stack.- I checked
vcvarsall.bat
and it appears to have the correct configuration (CALL "C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd" /x64
)
推荐答案
好!所以我做到了.
方法如下:
- 我卸载了所有Python版本,并删除了所有与Python相关的文件,文件夹等(包括PATH变量和包).
- 我卸载了所有Microsoft Visual Studio C ++ 2010 Redistributable,适用于Windows 7的Microsoft Windows SDK和.NET Framework 4程序(请谨慎使用.如果您只执行正确的文件,那么就可以了.我也卸载了其他Microsoft程序,并遇到几个注册表错误...).
- 重新安装适用于Windows 7和.NET Framework 4的Microsoft Windows SDK .
- 重新安装 Microsoft Visual C ++ 2010可再发行组件包(x64).
- 重新安装用于Windows SDK 7.1的Microsoft Visual C ++ 2010 Service Pack 1编译器更新.
- 重新安装 Python 3.4.0 (对
C:\Python34
). - 将
C:\Python34
和C:\Python34\Scripts
添加到PATH系统变量. - 从此网站此处(特别是
h5py-2.6.0-cp34-cp34m-win_amd64.whl
)下载H5py . - 运行
pip3 install h5py-2.6.0-cp34-cp34m-win_amd64.whl
.这将生成以下内容:
- 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
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
接下来,我运行我的程序以确保导入正常进行,并且做到了!我希望这对尝试此操作的人有所帮助,请非常小心执行步骤(2).
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).
这篇关于安装Python模块时出现Visual C ++ 10.0问题; cl.exe失败,退出状态为2(h5py)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!