Windows10下Python配置Dlib

 

記錄Windows10下用Python安裝dlib的過程。html

固然,安裝前先要裝好Anaconda並建立環境,方便後續包的管理。python

conda環境管理命令ios

 

1. wheel安裝

此法不支持GPU。c++

經過wheel能夠直接安裝dlib包,不須要編譯等操做。git

只需在wheel文件的目錄中cmd執行pip install xxx.whlgithub

如下記錄幾種wheel獲取途徑:canvas

  • dlib的19.8.1版本是最後一個官方提供wheel的版本,不過最高只支持到Python 3.6版本,Python版本不符合時會報錯提示windows

  • 這裏有好心人分享的Python 3.9版本的wheel,安裝時如提示is not a supported wheel on this platform,可參考此博客,使用pip debug --verbose,查看Compatible tags:後的內容,將文件名進行對應修改,再次pip install xxxx.whlapi

  • 第三種不算是wheel方法,但結果一致,故記錄在此;bash

    先添加清華源:

    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge 
    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/

    隨後conda install -c menpo dlib=19.20(此法對Python和dlib版本要求不嚴,但19.19版本測試有誤,故使用19.20)

 

2. pip安裝

可先配置CUDA環境再pip,可支持GPU。(dlib安裝時會自動尋找cuda環境,在筆記本上pip測試安裝時支持CUDA,待後續驗證)

pip安裝時,會自動安裝較新的版本,但因爲沒有wheel,須要Visual Studio中的C++編譯器,即時構建wheel。

  1. 安裝Visual Studio,community社區版便可;與多數博客所講的要求2015 update3不一樣,我在配置過程當中使用2019版本的VS也能成功安裝
  2. 安裝VS的工做負荷和單個組件,如下列出dlib安裝成功時的VS組件安裝狀況,並不保證每項都是必需的:
    1. 工做負荷:
      1. C++桌面開發
      2. 通用桌面開發
    2. 單個組件:
      1. C++核心功能
      2. MSBuild
      3. MSVC v142 - VS 2019 c++ arm生成工具 v14.25(此項選擇 最新 也可)
      4. MSVC v142 - VS 2019 c++ arm64生成工具 v14.25(此項選擇 最新 也可)
      5. MSVC v142 - VS 2019 c++ x64/86生成工具 v14.25(此項選擇 最新 也可)
      6. 用於 v142 生成工具的C++通用windows平臺(ARM64)
      7. 用於Windows的C++ Cmake工具
  3. pip install cmake:直接命令行輸入cmake測試安裝是否成功,能識別此命令便可
  4. pip install boost:有些地方提到較新的dlib不需此包,但又小又安裝快捷,因此仍是裝上了
  5. pip install dlib -v重點:-v是爲了觀察verbose,安裝失敗的話尋找verbose中的error信息並解決便可(有不少warning是正常現象,且不加-v的話安裝失敗也會顯示verbose)

 

3. 手動編譯,setup.py安裝

手動編譯dlib,能使其支持GPU。(推薦優先嚐試pip安裝的方法,環境要求一致,而且會自動判斷GPU是否可用)

參考1

參考2

  1. 如[2. pip安裝](# 2. pip安裝),安裝Visual Studio和相關組件,pip安裝cmakeboost

  2. 下載dlib項目

  3. 在該項目根目錄dlib-master下新建build文件夾(也可命令行mkdir build),並進入

  4. 在build目錄下

    命令行cmake .. -DDLIB_USE_CUDA=1 -DUSE_AVX_INSTRUCTIONS=1,參數意爲是否使用CUDA,是否使用CPU加速,根據實際狀況設置;執行結束顯示:

    -- Found Threads: TRUE
    -- C++11 activated.
    -- Configuring done
    -- Generating done
    -- Build files have been written to: D:/Download/dlib-master/build
  5. 命令行cmake --build .(最後有.,一篇參考博客遺漏了),顯示:

    dlib.vcxproj -> D:\Download\dlib-master\build\dlib\Debug\dlib19.22.99_debug_64bit_msvc1925.lib
    Building Custom Rule D:/Download/dlib-master/CMakeLists.txt
  6. 返回上級目錄,命令行python setup.py install,如失敗,一樣尋找error並解決;成功則顯示:

    Processing dlib-19.22.99-py3.7-win-amd64.egg
    creating d:\software\anaconda\envs\temp\lib\site-packages\dlib-19.22.99-py3.7-win-amd64.egg
    Extracting dlib-19.22.99-py3.7-win-amd64.egg to d:\software\anaconda\envs\temp\lib\site-packages
    Adding dlib 19.22.99 to easy-install.pth file
    
    Installed d:\software\anaconda\envs\temp\lib\site-packages\dlib-19.22.99-py3.7-win-amd64.egg
    Processing dependencies for dlib==19.22.99
    Finished processing dependencies for dlib==19.22.99

 

4. 驗證安裝成功

安裝成功後,可進入python測試:

(test) D:\Download\dlib-master>python
>>> import dlib
>>> dlib.__version__
'19.22.0'
>>> dlib.DLIB_USE_CUDA
False
>>>

其中dlib.DLIB_USE_CUDA輸出False表示當前dlib不支持CUDA。

 

5. 遇到的問題

  1. conda新建環境後,環境目錄下沒有包,只有一個meta文件夾:新建命令加上python或指出Python版本,如conda create -n new_env python conda create -n new_env python=3.9
  2. 安裝dlib時遇到的一個error信息:error C2734: 「GifAsciiTable8x8」: 若是不是外部的,則必須初始化常量對象,該問題出在Anaconda\Library\include\gif_lib.h文件的第286行,添加前綴extern表示它是外部變量便可;也有博客提到使用python setup.py install --no DLIB_GIF_SUPPORT方法,這就須要下載dlib項目,用setup.py安裝(這個出問題的文件在另外一臺電腦上根本就不存在,非常神祕)

 

6. 總結與完整verbose

核心就是要安裝Visual Studio及其各個組件、cmake和boost,並在安裝dlib時查看報錯信息,找到error加以解決

有博客提到不須要下載完整Visual Studio,只需安裝visual cpp build tools便可,可是我一直安裝失敗,因此放棄這種方法了。

另,不支持GPU的wheel能夠直接拿來安裝(Python與平臺等條件都適配的狀況下),支持GPU的wheel中已寫入了該電腦的CUDA配置,沒法直接使用。

最後貼出完整的pip安裝時的verbose,以供對照(例中沒有CUDA環境)。

(test) D:\Download\dlib-master>pip install dlib -v
Using pip 21.2.3 from D:\Software\Anaconda\envs\test\lib\site-packages\pip (python 3.9)
Collecting dlib
  Using cached dlib-19.22.0.tar.gz (7.4 MB)
    Running command python setup.py egg_info
    running egg_info
    creating C:\Users\22366_gu\AppData\Local\Temp\pip-pip-egg-info-hjnlvfnk\dlib.egg-info
    writing C:\Users\22366_gu\AppData\Local\Temp\pip-pip-egg-info-hjnlvfnk\dlib.egg-info\PKG-INFO
    writing dependency_links to C:\Users\22366_gu\AppData\Local\Temp\pip-pip-egg-info-hjnlvfnk\dlib.egg-info\dependency_links.txt
    writing top-level names to C:\Users\22366_gu\AppData\Local\Temp\pip-pip-egg-info-hjnlvfnk\dlib.egg-info\top_level.txt
    writing manifest file 'C:\Users\22366_gu\AppData\Local\Temp\pip-pip-egg-info-hjnlvfnk\dlib.egg-info\SOURCES.txt'
    package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)
    reading manifest file 'C:\Users\22366_gu\AppData\Local\Temp\pip-pip-egg-info-hjnlvfnk\dlib.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    no previously-included directories found matching 'tools\python\build*'
    no previously-included directories found matching 'dlib\test'
    writing manifest file 'C:\Users\22366_gu\AppData\Local\Temp\pip-pip-egg-info-hjnlvfnk\dlib.egg-info\SOURCES.txt'
Building wheels for collected packages: dlib
  Running command 'D:\Software\Anaconda\envs\test\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\22366_gu\\AppData\\Local\\Temp\\pip-install-hsjixceq\\dlib_680b8efad36243a0b84232cc3915f74b\\setup.py'"'"'; __file__='"'"'C:\\Users\\22366_gu\\AppData\\Local\\Temp\\pip-install-hsjixceq\\dlib_680b8efad36243a0b84232cc3915f74b\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\22366_gu\AppData\Local\Temp\pip-wheel-l92n3vf8'
  running bdist_wheel
  running build
  running build_py
  package init file 'tools\python\dlib\__init__.py' not found (or not a regular file)
  running build_ext
  Building extension for Python 3.9.6 | packaged by conda-forge | (default, Jul 11 2021, 03:37:25) [MSC v.1916 64 bit (AMD64)]
  Invoking CMake setup: 'cmake C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\lib.win-amd64-3.9 -DPYTHON_EXECUTABLE=D:\Software\Anaconda\envs\test\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\lib.win-amd64-3.9 -A x64'
  -- Building for: Visual Studio 16 2019
  -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
  -- The C compiler identification is MSVC 19.29.30040.0
  -- The CXX compiler identification is MSVC 19.29.30040.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30037/bin/Hostx64/x64/cl.exe - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Found PythonInterp: D:/Software/Anaconda/envs/test/python.exe (found version "3.9.6")
  -- Found PythonLibs: D:/Software/Anaconda/envs/test/libs/Python39.lib
  -- pybind11 v2.2.4
  -- Using CMake version: 3.20.21032501-MSVC_2
  -- Compiling dlib version: 19.22.0
  -- Looking for sys/types.h
  -- Looking for sys/types.h - found
  -- Looking for stdint.h
  -- Looking for stdint.h - found
  -- Looking for stddef.h
  -- Looking for stddef.h - found
  -- Check size of void*
  -- Check size of void* - done
  -- Enabling SSE2 instructions
  -- Searching for BLAS and LAPACK
  -- Searching for BLAS and LAPACK
  -- Looking for pthread.h
  -- Looking for pthread.h - not found
  -- Found Threads: TRUE
  CUDA_TOOLKIT_ROOT_DIR not found or specified
  -- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.5")
  -- Found CUDA, but CMake was unable to find the cuBLAS libraries that should be part of every basic CUDA install. Your CUDA install is somehow broken or incomplete. Since cuBLAS is required for dlib to use CUDA we won't use CUDA.
  -- DID NOT FIND CUDA
  -- Disabling CUDA support for dlib.  DLIB WILL NOT USE CUDA
  -- C++11 activated.
  -- Configuring done
  -- Generating done
  -- Build files have been written to: C:/Users/22366_gu/AppData/Local/Temp/pip-install-hsjixceq/dlib_680b8efad36243a0b84232cc3915f74b/build/temp.win-amd64-3.9/Release
  Invoking CMake build: 'cmake --build . --config Release -- /m'
  用於 .NET Framework 的 Microsoft (R) 生成引擎版本 16.10.2+857e5a733
  版權全部(C) Microsoft Corporation。保留全部權利。

  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(517,5): warning MSB8029: 中間目錄或輸出目錄沒法駐留在臨時目錄下,由於這可能會致使增量生成出現問題。 [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\ZERO_CHECK.vcxproj]
    Checking Build System
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(517,5): warning MSB8029: 中間目錄或輸出目錄沒法駐留在臨時目錄下,由於這可能會致使增量生成出現問題。 [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\dlib_build\dlib.vcxproj]
    Building Custom Rule C:/Users/22366_gu/AppData/Local/Temp/pip-install-hsjixceq/dlib_680b8efad36243a0b84232cc3915f74b/dlib/CMakeLists.txt
    base64_kernel_1.cpp
    bigint_kernel_1.cpp
    bigint_kernel_2.cpp
    bit_stream_kernel_1.cpp
    entropy_decoder_kernel_1.cpp
    entropy_decoder_kernel_2.cpp
    entropy_encoder_kernel_1.cpp
    entropy_encoder_kernel_2.cpp
    fonts.cpp
    md5_kernel_1.cpp
    tokenizer_kernel_1.cpp
    unicode.cpp
    test_for_odr_violations.cpp
    sockets_kernel_1.cpp
    bsp.cpp
    dir_nav_kernel_1.cpp
    dir_nav_kernel_2.cpp
    dir_nav_extensions.cpp
    linker_kernel_1.cpp
    extra_logger_headers.cpp
    logger_kernel_1.cpp
    logger_config_file.cpp
    misc_api_kernel_1.cpp
    misc_api_kernel_2.cpp
    sockets_extensions.cpp
    sockets_kernel_2.cpp
    sockstreambuf.cpp
    sockstreambuf_unbuffered.cpp
    server_kernel.cpp
    server_iostream.cpp
    server_http.cpp
    multithreaded_object_extension.cpp
    threaded_object_extension.cpp
    threads_kernel_1.cpp
    threads_kernel_2.cpp
    threads_kernel_shared.cpp
    thread_pool_extension.cpp
    async.cpp
    timer.cpp
    stack_trace.cpp
    cpu_dlib.cpp
    tensor_tools.cpp
    image_dataset_metadata.cpp
    mnist.cpp
    cifar.cpp
    global_function_search.cpp
    kalman_filter.cpp
    auto.cpp
    widgets.cpp
    drawable.cpp
    canvas_drawing.cpp
    style.cpp
    base_widgets.cpp
    gui_core_kernel_1.cpp
    gui_core_kernel_2.cpp
    png_loader.cpp
    save_png.cpp
    jpeg_loader.cpp
    save_jpeg.cpp
    arm_init.c
    filter_neon_intrinsics.c
    png.c
    pngerror.c
    pngget.c
    pngmem.c
    pngpread.c
    pngread.c
    pngrio.c
    pngrtran.c
    pngrutil.c
    pngset.c
    pngtrans.c
    pngwio.c
    pngwrite.c
    pngwtran.c
    pngwutil.c
    adler32.c
    compress.c
    crc32.c
    deflate.c
    gzclose.c
    gzlib.c
    gzread.c
    gzwrite.c
    infback.c
    inffast.c
    inflate.c
    inftrees.c
    trees.c
    uncompr.c
    zutil.c
    jaricom.c
    jcapimin.c
    jcapistd.c
    jcarith.c
    jccoefct.c
    jccolor.c
    jcdctmgr.c
    jchuff.c
    jcinit.c
    jcmainct.c
    jcmarker.c
    jcmaster.c
    jcomapi.c
    jcparam.c
    jcprepct.c
    jcsample.c
    jdapimin.c
    jdapistd.c
    jdarith.c
    jdatadst.c
    jdatasrc.c
    jdcoefct.c
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\external\libjpeg\jdatadst.c(185,60): warning C4267: 「=」: 從「size_t」轉換到「unsigned long」,可能丟失數據 [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\dlib_build\dlib.vcxproj]
    jdcolor.c
    jddctmgr.c
    jdhuff.c
    jdinput.c
    jdmainct.c
    jdmarker.c
    jdmaster.c
    jdmerge.c
    jdpostct.c
    jdsample.c
    jerror.c
    jfdctflt.c
    jfdctfst.c
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\external\libjpeg\jerror.c(193,5): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\dlib_build\dlib.vcxproj]
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\external\libjpeg\jerror.c(195,5): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\dlib_build\dlib.vcxproj]
    jfdctint.c
    jidctflt.c
    jidctfst.c
    jidctint.c
    jmemmgr.c
    jmemnobs.c
    jquant1.c
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\external\libjpeg\jmemmgr.c(307,53): warning C4267: 「+=」: 從「size_t」轉換到「long」,可能丟失數據 [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\dlib_build\dlib.vcxproj]
    jquant2.c
    jutils.c
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\external\libjpeg\jmemmgr.c(367,70): warning C4267: 「+=」: 從「size_t」轉換到「long」,可能丟失數據 [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\dlib_build\dlib.vcxproj]
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\external\libjpeg\jmemmgr.c(977,46): warning C4267: 「-=」: 從「size_t」轉換到「long」,可能丟失數據 [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\dlib_build\dlib.vcxproj]
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\external\libjpeg\jmemmgr.c(991,46): warning C4267: 「-=」: 從「size_t」轉換到「long」,可能丟失數據 [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\dlib_build\dlib.vcxproj]
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\external\libjpeg\jmemmgr.c(1107,19): warning C4996: 'getenv': This function or variable may be unsafe. Consider using _dupenv_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\dlib_build\dlib.vcxproj]
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\external\libjpeg\jmemmgr.c(1110,11): warning C4996: 'sscanf': This function or variable may be unsafe. Consider using sscanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\dlib_build\dlib.vcxproj]
    dlib.vcxproj -> C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\dlib_build\Release\dlib19.22.0_release_64bit_msvc1929.lib
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(517,5): warning MSB8029: 中間目錄或輸出目錄沒法駐留在臨時目錄下,由於這可能會致使增量生成出現問題。 [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
    Building Custom Rule C:/Users/22366_gu/AppData/Local/Temp/pip-install-hsjixceq/dlib_680b8efad36243a0b84232cc3915f74b/tools/python/CMakeLists.txt
    dlib.cpp
    matrix.cpp
    vector.cpp
    svm_c_trainer.cpp
    svm_rank_trainer.cpp
    decision_functions.cpp
    other.cpp
    basic.cpp
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\image_transforms/morphological_operations.h(1,1): warning C4819: 該文件包含不能在當前代碼頁(936)中表示的字符。請將該文件保存爲 Unicode 格式以防止數據丟失 (編譯源文件 C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python\src\vector.cpp) [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
    cca.cpp
    sequence_segmenter.cpp
    svm_struct.cpp
    image.cpp
    image2.cpp
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\image_transforms/morphological_operations.h(1,1): warning C4819: 該文件包含不能在當前代碼頁(936)中表示的字符。請將該文件保存爲 Unicode 格式以防止數據丟失 (編譯源文件 C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python\src\image.cpp) [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\image_transforms/morphological_operations.h(1,1): warning C4819: 該文件包含不能在當前代碼頁(936)中表示的字符。請將該文件保存爲 Unicode 格式以防止數據丟失 (編譯源文件 C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python\src\image2.cpp) [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
    image3.cpp
    image4.cpp
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\image_transforms/morphological_operations.h(1,1): warning C4819: 該文件包含不能在當前代碼頁(936)中表示的字符。請將該文件保存爲 Unicode 格式以防止數據丟失 (編譯源文件 C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python\src\image3.cpp) [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
    rectangles.cpp
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\image_transforms/morphological_operations.h(1,1): warning C4819: 該文件包含不能在當前代碼頁(936)中表示的字符。請將該文件保存爲 Unicode 格式以防止數據丟失 (編譯源文件 C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python\src\image4.cpp) [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\..\dlib/image_transforms/assign_image.h(86,45): warning C4018: 「>=」: 有符號/無符號不匹配 (編譯源文件 C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python\src\image3.cpp) [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\..\dlib/image_transforms/assign_image.h(160): message : 查看對正在編譯的函數 模板 實例化「void dlib::impl_assign_image_scaled<out_image_type,src_image_type>(dlib::image_view<out_image_type> &,const src_image_type &,const double)」的引用 [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
            with
            [
                out_image_type=dlib::numpy_image<int8_t>,
                src_image_type=dlib::matrix_op<dlib::op_image_to_mat<dlib::numpy_image<uint32_t>,uint32_t>>
            ] (編譯源文件 C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python\src\image3.cpp)
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\..\dlib/image_transforms/assign_image.h(177): message : 查看對正在編譯的函數 模板 實例化「void dlib::impl_assign_image_scaled<dest_image_type,dlib::matrix_op<dlib::op_image_to_mat<src_image_type,t>>>(dest_image_type &,const dlib::matrix_op<dlib::op_image_to_mat<src_image_type,t>> &,const double)」的引用 [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
            with
            [
                dest_image_type=dlib::numpy_image<int8_t>,
                src_image_type=dlib::numpy_image<uint32_t>,
                T=uint32_t
            ] (編譯源文件 C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python\src\image3.cpp)
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python\src\image3.cpp(27): message : 查看對正在編譯的函數 模板 實例化「void dlib::assign_image_scaled<dlib::numpy_image<int8_t>,dlib::numpy_image<uint32_t>>(dest_image_type &,const src_image_type &,const double)」的引用 [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
            with
            [
                dest_image_type=dlib::numpy_image<int8_t>,
                src_image_type=dlib::numpy_image<uint32_t>
            ]
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python\src\image3.cpp(435): message : 查看對正在編譯的函數 模板 實例化「pybind11::array convert_image_scaled<uint32_t>(const dlib::numpy_image<uint32_t> &,const std::string &,const double)」的引用 [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\..\dlib/image_transforms/assign_image.h(87,45): warning C4018: 「<=」: 有符號/無符號不匹配 (編譯源文件 C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python\src\image3.cpp) [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
    object_detection.cpp
    shape_predictor.cpp
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\image_transforms/morphological_operations.h(1,1): warning C4819: 該文件包含不能在當前代碼頁(936)中表示的字符。請將該文件保存爲 Unicode 格式以防止數據丟失 (編譯源文件 C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python\src\object_detection.cpp) [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\image_transforms/morphological_operations.h(1,1): warning C4819: 該文件包含不能在當前代碼頁(936)中表示的字符。請將該文件保存爲 Unicode 格式以防止數據丟失 (編譯源文件 C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python\src\shape_predictor.cpp) [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
    correlation_tracker.cpp
    face_recognition.cpp
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\image_transforms/morphological_operations.h(1,1): warning C4819: 該文件包含不能在當前代碼頁(936)中表示的字符。請將該文件保存爲 Unicode 格式以防止數據丟失 (編譯源文件 C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python\src\correlation_tracker.cpp) [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
    cnn_face_detector.cpp
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\image_transforms/morphological_operations.h(1,1): warning C4819: 該文件包含不能在當前代碼頁(936)中表示的字符。請將該文件保存爲 Unicode 格式以防止數據丟失 (編譯源文件 C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python\src\face_recognition.cpp) [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
    global_optimization.cpp
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\image_transforms/morphological_operations.h(1,1): warning C4819: 該文件包含不能在當前代碼頁(936)中表示的字符。請將該文件保存爲 Unicode 格式以防止數據丟失 (編譯源文件 C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python\src\cnn_face_detector.cpp) [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
    image_dataset_metadata.cpp
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\image_transforms/morphological_operations.h(1,1): warning C4819: 該文件包含不能在當前代碼頁(936)中表示的字符。請將該文件保存爲 Unicode 格式以防止數據丟失 (編譯源文件 C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python\src\image_dataset_metadata.cpp) [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
    numpy_returns.cpp
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\image_transforms/morphological_operations.h(1,1): warning C4819: 該文件包含不能在當前代碼頁(936)中表示的字符。請將該文件保存爲 Unicode 格式以防止數據丟失 (編譯源文件 C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python\src\numpy_returns.cpp) [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
    line.cpp
    gui.cpp
  C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\dlib\image_transforms/morphological_operations.h(1,1): warning C4819: 該文件包含不能在當前代碼頁(936)中表示的字符。請將該文件保存爲 Unicode 格式以防止數據丟失 (編譯源文件 C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\tools\python\src\gui.cpp) [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\_dlib_pybind11.vcxproj]
      正在建立庫 C:/Users/22366_gu/AppData/Local/Temp/pip-install-hsjixceq/dlib_680b8efad36243a0b84232cc3915f74b/build/temp.win-amd64-3.9/Release/Release/_dlib_pybind11.lib 和對象 C:/Users/22366_gu/AppData/Local/Temp/pip-install-hsjixceq/dlib_680b8efad36243a0b84232cc3915f74b/build/temp.win-amd64-3.9/Release/Release/_dlib_pybind11.exp
    _dlib_pybind11.vcxproj -> C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\lib.win-amd64-3.9\_dlib_pybind11.cp39-win_amd64.pyd
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(517,5): warning MSB8029: 中間目錄或輸出目錄沒法駐留在臨時目錄下,由於這可能會致使增量生成出現問題。 [C:\Users\22366_gu\AppData\Local\Temp\pip-install-hsjixceq\dlib_680b8efad36243a0b84232cc3915f74b\build\temp.win-amd64-3.9\Release\ALL_BUILD.vcxproj]
    Building Custom Rule C:/Users/22366_gu/AppData/Local/Temp/pip-install-hsjixceq/dlib_680b8efad36243a0b84232cc3915f74b/tools/python/CMakeLists.txt
  installing to build\bdist.win-amd64\wheel
  running install
  running install_lib
  creating build\bdist.win-amd64
  creating build\bdist.win-amd64\wheel
  creating build\bdist.win-amd64\wheel\dlib
  copying build\lib.win-amd64-3.9\dlib\__init__.py -> build\bdist.win-amd64\wheel\.\dlib
  copying build\lib.win-amd64-3.9\_dlib_pybind11.cp39-win_amd64.pyd -> build\bdist.win-amd64\wheel\.
  running install_egg_info
  running egg_info
  writing tools/python\dlib.egg-info\PKG-INFO
  writing dependency_links to tools/python\dlib.egg-info\dependency_links.txt
  writing top-level names to tools/python\dlib.egg-info\top_level.txt
  reading manifest file 'tools/python\dlib.egg-info\SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  no previously-included directories found matching 'tools\python\build*'
  no previously-included directories found matching 'dlib\test'
  writing manifest file 'tools/python\dlib.egg-info\SOURCES.txt'
  Copying tools/python\dlib.egg-info to build\bdist.win-amd64\wheel\.\dlib-19.22.0-py3.9.egg-info
  running install_scripts
  D:\Software\Anaconda\envs\test\lib\site-packages\wheel\bdist_wheel.py:80: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
    if get_flag('Py_DEBUG',
  creating build\bdist.win-amd64\wheel\dlib-19.22.0.dist-info\WHEEL
  creating 'C:\Users\22366_gu\AppData\Local\Temp\pip-wheel-l92n3vf8\dlib-19.22.0-cp39-cp39-win_amd64.whl' and adding 'build\bdist.win-amd64\wheel' to it
  adding '_dlib_pybind11.cp39-win_amd64.pyd'
  adding 'dlib/__init__.py'
  adding 'dlib-19.22.0.dist-info/METADATA'
  adding 'dlib-19.22.0.dist-info/WHEEL'
  adding 'dlib-19.22.0.dist-info/top_level.txt'
  adding 'dlib-19.22.0.dist-info/RECORD'
  removing build\bdist.win-amd64\wheel
  Building wheel for dlib (setup.py) ... done
  Created wheel for dlib: filename=dlib-19.22.0-cp39-cp39-win_amd64.whl size=2946201 sha256=4f0c103da0eadc711bf08b265141813b688229362f8fd24d3ad2a7ecace38a0b
  Stored in directory: c:\users\22366_gu\appdata\local\pip\cache\wheels\33\2c\16\6ceb1bda8e67571304aaf3cd80c8cb47dc8d5ab99e34bda88b
Successfully built dlib
Installing collected packages: dlib
Successfully installed dlib-19.22.0
相關文章
相關標籤/搜索