Pip install h3由于“make no targets specified and no makefile found”而失败

2024-10-01 17:35:30 发布

您现在位置:Python中文网/ 问答频道 /正文

我今天尝试在我的Windows机器上安装h3绑定python,但是在安装时遇到了一些问题。启动pip install h3后,我收到以下错误消息:

    HEAD is now at cdd6819 Merge pull request #111 from isaacbrodsky/version-3.1.0
  + cmake -DENABLE_FORMAT=OFF -DBUILD_SHARED_LIBS=ON .
  -- Building for: Visual Studio 15 2017
  -- The C compiler identification is MSVC 19.15.26726.0
  -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x86/cl.exe
  -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Enterprise/VC/Tools/MSVC/14.15.26726/bin/Hostx86/x86/cl.exe -- works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Checking for stack allocation function (alloca) - Success
  -- Checking for VLA support - Failed
  CMake Warning at CMakeLists.txt:218 (message):
    clang-format was not detected, so automatic source code reformatting is
    disabled


  CMake Warning at CMakeLists.txt:230 (message):
    clang-tidy was not detected, so source code linting is disabled


  -- Found Doxygen: C:/Program Files/doxygen/bin/doxygen.exe (found version "1.8.14") found components:  doxygen dot
  -- Configuring done
  -- Generating done
  -- Build files have been written to: C:/Users/speic/AppData/Local/Temp/pip-install-781fg09z/h3/h3c
  + make
  make: *** No targets specified and no makefile found.  Stop.
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "C:\Users\speic\AppData\Local\Temp\pip-install-781fg09z\h3\setup.py", line 60, in <module>
      distclass=BinaryDistribution)
    File "c:\users\speic\appdata\local\programs\python\python36\lib\site-packages\setuptools\__init__.py", line 129, in setup
      return distutils.core.setup(**attrs)
    File "c:\users\speic\appdata\local\programs\python\python36\lib\distutils\core.py", line 148, in setup
      dist.run_commands()
    File "c:\users\speic\appdata\local\programs\python\python36\lib\distutils\dist.py", line 955, in run_commands
      self.run_command(cmd)
    File "c:\users\speic\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "c:\users\speic\appdata\local\programs\python\python36\lib\site-packages\wheel\bdist_wheel.py", line 202, in run
      self.run_command('build')
    File "c:\users\speic\appdata\local\programs\python\python36\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "c:\users\speic\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "c:\users\speic\appdata\local\programs\python\python36\lib\distutils\command\build.py", line 135, in run
      self.run_command(cmd_name)
    File "c:\users\speic\appdata\local\programs\python\python36\lib\distutils\cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "c:\users\speic\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
      cmd_obj.run()
    File "C:\Users\speic\AppData\Local\Temp\pip-install-781fg09z\h3\setup.py", line 23, in run
      install_h3(h3_version)
    File "C:\Users\speic\AppData\Local\Temp\pip-install-781fg09z\h3\setup.py", line 16, in install_h3
      'bash ./.install.sh {}'.format(h3_version), shell=True, check=True)
    File "c:\users\speic\appdata\local\programs\python\python36\lib\subprocess.py", line 418, in run
      output=stdout, stderr=stderr)
  subprocess.CalledProcessError: Command 'bash ./.install.sh v3.1.0' returned non-zero exit status 2.

Cmake、make和c编译器都已安装并添加到路径中。看起来make找不到任何make文件,但据我所见,生成文件是成功生成的。在

我希望任何人都能帮助我安装,因为我对构建过程还是相当陌生的,这些错误消息对我来说似乎相当神秘。在

谢谢:)

编辑: 我觉得我已经设法解决了一些问题,但不知何故,我还是不知道如何继续下去。 我目前的步骤:

  1. 我已经克隆了h3-py Repository from github
  2. {我修改了以下内容: 我已将cmake -DENABLE_FORMAT=OFF -DBUILD_SHARED_LIBS=ON .改为cmake -G "Unix Makefiles" -DCMAKE_C_COMPILER="C:/MinGW/bin/gcc.exe" -DCMAKE_CXX_COMPILER="C:/MinGW/bin/g++.exe" -DENABLE_FORMAT=OFF -DBUILD_SHARED_LIBS=ON . 在这之后,构建过程似乎运行得很好。但是在构建过程之后我得到一个错误:+ ls -l 'lib/libh3*' ls: cannot access 'lib/libh3*': No such file or directory 错误信息是正确的。没有任何目录库,但是bin/directory中有一个libh3.dll文件,所以我试图将lib.install.sh文件中的bin交换

^{pr2}$

而不是

ls -l lib/libh3*
cp lib/libh3* ../h3/out
if [ -e ../build ] && [ -d ../build ]; then
    LIBNAME=`ls ../build/ | grep '^lib'`
    mkdir -p ../build/$LIBNAME/h3/out
    cp lib/libh3* ../build/$LIBNAME/h3/out
fi
popd
rm -rf h3c

而且shell脚本执行得很好。然而,我不知道我所做的一切是否正确,我应该如何从那里继续,因为显然没有h3包安装在这一点上。在


Tags: installruninpyliblocallineusers

热门问题