import tensorflow时出现的h5py问题:The HDF5 header files used to compile this application do not match....

今天打开pycharm,由于写的一些练习代码中用到tensorflow,后台自动更新了tensorflow及其他的一些配置吧。

后来在windows的shell中做测试,import tensorflow后,一直出现python停止运行,无法使用。

错误如下:

PS C:\Users\石威(Sesen)> python
Python 3.6.4 |Anaconda custom (64-bit)| (default, Jan 16 2018, 10:22:32) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
D:\Anaconda3\lib\site-packages\h5py\__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Warning! ***HDF5 library version mismatched error***
The HDF5 header files used to compile this application do not match
the version used by the HDF5 library to which this application is linked.
Data corruption or segmentation faults may occur if the application continues.
This can happen when an application was compiled by one version of HDF5 but
linked with a different version of static or shared HDF5 library.
You should recompile the application or check your shared library related
settings such as 'LD_LIBRARY_PATH'.
You can, at your own risk, disable this warning by setting the environment
variable 'HDF5_DISABLE_VERSION_CHECK' to a value of '1'.
Setting it to 2 or higher will suppress the warning messages totally.
Headers are 1.10.2, library is 1.10.1
            SUMMARY OF THE HDF5 CONFIGURATION
            =================================

General Information:
-------------------
                   HDF5 Version: 1.10.1
                  Configured on: 2017-05-08
                  Configured by: Visual Studio 14 2015 Win64
                    Host system: Windows-10.0.15063
              Uname information: Windows
                       Byte sex: little-endian
             Installation point: C:/Program Files/HDF5

Compiling Options:
------------------
                     Build Mode:
              Debugging Symbols:
                        Asserts:
                      Profiling:
             Optimization Level:

Linking Options:
----------------
                      Libraries:
  Statically Linked Executables: OFF
                        LDFLAGS: /machine:x64
                     H5_LDFLAGS:
                     AM_LDFLAGS:
                Extra libraries: X:inclib-vc14-x64/zlib.lib;X:/inclib-vc14-x64/libsz.lib;X:/inclib-vc14-x64/libaec.lib
                       Archiver:
                         Ranlib:

Languages:
----------
                              C: yes
                     C Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe 19.0.24215.1
                       CPPFLAGS:
                    H5_CPPFLAGS:
                    AM_CPPFLAGS:
                         CFLAGS: /DWIN32 /D_WINDOWS /W3
                      H5_CFLAGS:
                      AM_CFLAGS:
               Shared C Library: YES
               Static C Library: YES

                        Fortran: OFF
               Fortran Compiler:
                  Fortran Flags:
               H5 Fortran Flags:
               AM Fortran Flags:
         Shared Fortran Library: YES
         Static Fortran Library: YES

                            C++: ON
                   C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe 19.0.24215.1
                      C++ Flags: /DWIN32 /D_WINDOWS /W3 /GR /EHsc
                   H5 C++ Flags:
                   AM C++ Flags:
             Shared C++ Library: YES
             Static C++ Library: YES

                            JAVA: OFF
                   JAVA Compiler:

Features:
---------
                  Parallel HDF5: OFF
             High-level library: ON
                   Threadsafety: OFF
            Default API mapping: v110
 With deprecated public symbols: ON
         I/O filters (external):  DEFLATE DECODE ENCODE
                            MPE:
                     Direct VFD:
                        dmalloc:
 Packages w/ extra debug output:
                    API Tracing: OFF
           Using memory checker: OFF
Memory allocation sanity checks: OFF
            Metadata trace file:
         Function Stack Tracing: OFF
      Strict File Format Checks: OFF
   Optimization Instrumentation:
Bye...

提示库函数版本不匹配。

简单粗暴的方法为:卸载,重载

 pip uninstall h5py
 pip install h5py

 

 

 

 

你可能感兴趣的:(Linux工程问题)