为Windows安装dlib:“ dlib的构建轮失败”和“非零退出状态1”

时间:2019-02-01 16:23:36

标签: python visual-studio dlib

我正在Windows 10上运行Python 3.6,并安装了cmake(通过pip),cuda 9.2和最新版本的Visual Studio(15.9.6),以及其他地方提到的2015 v140工具集组件({{ 3}}):

https://devtalk.nvidia.com/default/topic/1027299/cuda-setup-and-installation/cuda-9-failed-to-support-the-latest-visual-studio-2017-version-15-5/2

在运行pip install dlib时,我得到了大量输出(在此处粘贴太多),但其中包含“ dlib的构建轮子失败”,最后一部分如下:

        9 Warning(s)
        10 Error(s)

    Time Elapsed 00:04:17.30
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\james\AppData\Local\Temp\pip-install-9erypcmb\dlib\setup.py", line 257, in <module>
        'Topic :: Software Development',
      File "c:\users\james\appdata\local\programs\python\python36\lib\site-packages\setuptools\__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "c:\users\james\appdata\local\programs\python\python36\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "c:\users\james\appdata\local\programs\python\python36\lib\distutils\dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "c:\users\james\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "c:\users\james\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "c:\users\james\appdata\local\programs\python\python36\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "c:\users\james\appdata\local\programs\python\python36\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\users\james\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "c:\users\james\appdata\local\programs\python\python36\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "c:\users\james\appdata\local\programs\python\python36\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\users\james\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "C:\Users\james\AppData\Local\Temp\pip-install-9erypcmb\dlib\setup.py", line 133, in run
        self.build_extension(ext)
      File "C:\Users\james\AppData\Local\Temp\pip-install-9erypcmb\dlib\setup.py", line 173, in build_extension
        subprocess.check_call(cmake_build, cwd=build_folder)
      File "c:\users\james\appdata\local\programs\python\python36\lib\subprocess.py", line 291, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1.

    ----------------------------------------
Command "c:\users\james\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\james\\AppData\\Local\\Temp\\pip-install-9erypcmb\\dlib\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\james\AppData\Local\Temp\pip-record-21ymtq1y\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\james\AppData\Local\Temp\pip-install-9erypcmb\dlib\

1 个答案:

答案 0 :(得分:1)