尝试运行OpenMMD时,出现了另一个错误:“h5py在构建时针对HDF5 1.10.4,但现在正在运行针对1.10.5的HDF5”。

4
我正在尝试直接将真人视频转换为动画模型(即初音未来,Anmicius)的运动,按照此处指示进行操作:

https://github.com/peterljq/OpenMMD

以及此处:

https://www.youtube.com/watch?v=hKx6jl9a5-I

在发出所有建议的命令后,会出现以下情况:

C:\Users\marietto2020\Desktop\MMD\OpenMMD\OpenMMD 1.0\3d-pose-baseline-vmd
(tensorflow) λ openposeto3d

´╗┐es (40 sloc) 1.62 KB
"´╗┐es" is not recognized as an internal or external command or as a batch file.
Please input the path of result from OpenPose Execution: JSON folder
Input is limited to English characters and numbers.
Ôûáthe path of result from OpenPose Execution (JSON folder): json
--------------
The max number of people in your video.
If no input and press Enter, the number of be set to default: 1 person.
The max number of people in your video: 1
--------------
If you want the detailed information of GIF, input yes.
If no input and press Enter, the generation setting of GIF will be set to default.
warn If you input warn, then no GIF will be generated.
the detailed information[yes/no/warn]: yes
C:\Users\marietto2020\.conda\envs\tensorflow\lib\site-packages\h5py\__init__.py:40: UserWarning: h5py is running against HDF5 1.10.5 when it was built against 1.10.4, this may cause problems
  '{0}.{1}.{2}'.format(*version.hdf5_built_version_tuple)
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.4, library is 1.10.5
        SUMMARY OF THE HDF5 CONFIGURATION
        =================================

General Information:
-------------------
                   HDF5 Version: 1.10.5
                  Configured on: 2019-03-04
                  Configured by: Visual Studio 14 2015 Win64
                    Host system: Windows-10.0.17763
              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:
                       Archiver:
                         Ranlib:

Languages:
----------
                              C: yes
                     C Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe 19.0.24218.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.24218.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
Parallel Filtered Dataset Writes:
              Large Parallel I/O:
              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
          Function Stack Tracing: OFF
       Strict File Format Checks: OFF
    Optimization Instrumentation:
Bye...

而进程就此停止。相反,这应该是发生的情况: pic 如何解决警告/错误?谢谢。
3个回答

11

尝试以下步骤:

  1. 第一步,使用以下命令卸载 h5py

    pip uninstall h5py

  2. 然后重新安装它:

    pip install h5py


3

根本问题似乎是:

a)在您的conda环境中有一个hdf5(例如此处为1.10.4) b)在VS C++环境中有另一个hdf5(例如此处为1.10.5)

当您首次在conda环境中构建h5py时,它是针对conda环境中的hdf5 1.10.4进行构建的,然后当keras调用基于hdf5 1.10.4 C++环境的底层tensorflow时,就会存在冲突。

解决方案:

有几种解决方法和修复方法。从根本上说:

i)我删除了Keras,例如: conda remove keras

ii)将conda环境中的hdf5更改为与VS C++相同,例如: conda install --force hdf5=1.10.4

iii)重新安装Keras,例如: conda install keras


0
在R中,以下过程对我有所帮助:
hdf5version<-"hdf5=1.10.4" # change hdf5 version accordingly
reticulate::conda_install(packages = hdf5version, pip = TRUE) #pip = TRUE might not be necessary
reticulate::use_condaenv(hdf5version, required = TRUE) 
install.packages("tensorflow")
install.packages("keras")
library("keras")
install_keras()

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接