百度飞将aistudio安装dblib失败的解决办法,现在包,python setup devlop;libboost_python-py27.so.1.58.0: undefined symbol:

最简单方法 

!pip install dlib-bin -t /home/aistudio/external-libraries

其他尝试的方法

dblib的镜像在这里

https://pypi.tuna.tsinghua.edu.cn/simple/

https://pypi.tuna.tsinghua.edu.cn/packages/f2/02/dbffb7023494e1e39981ca65010b27501e844a0c8e79e1a3034ad8bf3734/dlib-19.12.0.tar.gz#sha256=3cd3a9cf0d8eae5f6bd7f4e87cf70eee1593e65a516f08a4712340a89f69d23e

%cd /home/aistudio/dlib_build

------ wget不行,会403错误,-

!wget https://pypi.tuna.tsinghua.edu.cn/packages/54/ff/5781a11bdc0d1c90a813f3f66d460abf628e5114856a842d18d43f709a7a/dlib-19.10.0.tar.gz#sha256=d253701b7c17bf87e77055ca1fca551bda9e700fe90d61d27c72c5848237637e

手动下载并手动上传到aistudio文件中,在aistudio 经典版,左侧右上角 有上传按钮

%cd /home/aistudio

!tar -xf /home/aistudio/dlib-19.0.0.tar.gz -C dlib_build -v

%cd /home/aistudio/dlib_build/dlib-19.0.0

!python setup.py develop

develop表示开发版本

/home/aistudio/dlib_build/dlib-19.0.0
running develop
running build
Detected Python architecture: 64bit
Detected platform: linux
Configuring cmake ...
CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as
    project(ProjectName)
  near the top of the file, but after cmake_minimum_required().
  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - 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: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Deprecation Warning at CMakeLists.txt:2 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.
  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
CMake Warning at /usr/local/share/cmake-3.24/Modules/FindBoost.cmake:2217 (message):
  No header defined for python-py34; skipping header check (note: header-only
  libraries have no designated component)
Call Stack (most recent call first):
  /home/aistudio/dlib_build/dlib-19.0.0/dlib/add_python_module:60 (FIND_PACKAGE)
  CMakeLists.txt:6 (include)
-- Could NOT find Boost (missing: python-py34) (found suitable version "1.58.0", minimum required is "1.41.0")
-- Found Boost: /usr/include (found suitable version "1.58.0", minimum required is "1.41.0") found components: python
-- Found PythonLibs: /opt/conda/envs/python35-paddle120-env/lib/libpython3.7m.so (found suitable version "3.7.4", minimum required is "3.4")
-- USING BOOST_LIBS: /usr/lib/x86_64-linux-gnu/libboost_python.so
-- USING PYTHON_LIBS: /opt/conda/envs/python35-paddle120-env/lib/libpython3.7m.so
CMake Deprecation Warning at /home/aistudio/dlib_build/dlib-19.0.0/dlib/cmake:5 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.
  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  /home/aistudio/dlib_build/dlib-19.0.0/dlib/add_python_module:134 (include)
  CMakeLists.txt:6 (include)
CMake Deprecation Warning at /home/aistudio/dlib_build/dlib-19.0.0/dlib/add_global_compiler_switch.cmake:3 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.
  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  /home/aistudio/dlib_build/dlib-19.0.0/dlib/cmake:16 (include)
  /home/aistudio/dlib_build/dlib-19.0.0/dlib/add_python_module:134 (include)
  CMakeLists.txt:6 (include)
CMake Deprecation Warning at /home/aistudio/dlib_build/dlib-19.0.0/dlib/use_cpp_11.cmake:5 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.
  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  /home/aistudio/dlib_build/dlib-19.0.0/dlib/cmake:17 (include)
  /home/aistudio/dlib_build/dlib-19.0.0/dlib/add_python_module:134 (include)
  CMakeLists.txt:6 (include)
CMake Deprecation Warning at /home/aistudio/dlib_build/dlib-19.0.0/dlib/add_global_compiler_switch.cmake:3 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.
  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  /home/aistudio/dlib_build/dlib-19.0.0/dlib/use_cpp_11.cmake:21 (include)
  /home/aistudio/dlib_build/dlib-19.0.0/dlib/cmake:17 (include)
  /home/aistudio/dlib_build/dlib-19.0.0/dlib/add_python_module:134 (include)
  CMakeLists.txt:6 (include)
-- C++11 activated.
-- Enabling SSE4 instructions
CMake Deprecation Warning at /home/aistudio/dlib_build/dlib-19.0.0/dlib/CMakeLists.txt:7 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.
  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
CMake Deprecation Warning at /home/aistudio/dlib_build/dlib-19.0.0/dlib/use_cpp_11.cmake:5 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.
  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  /home/aistudio/dlib_build/dlib-19.0.0/dlib/CMakeLists.txt:12 (include)
CMake Deprecation Warning at /home/aistudio/dlib_build/dlib-19.0.0/dlib/add_global_compiler_switch.cmake:3 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.
  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.
Call Stack (most recent call first):
  /home/aistudio/dlib_build/dlib-19.0.0/dlib/CMakeLists.txt:34 (include)
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found X11: /usr/include
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so
-- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for IceConnectionNumber in ICE
-- Looking for IceConnectionNumber in ICE - found
-- Looking for png_create_read_struct
-- Looking for png_create_read_struct - found
-- Looking for jpeg_read_header
-- Looking for jpeg_read_header - found
-- Searching for BLAS and LAPACK
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1")
-- Checking for module 'cblas'
--   No package 'cblas' found
-- Checking for module 'lapack'
--   Found lapack, version 3.10.2
-- Looking for sys/types.h
CMake Warning (dev) at /usr/local/share/cmake-3.24/Modules/CheckIncludeFile.cmake:82 (message):
  Policy CMP0075 is not set: Include file check macros honor
  CMAKE_REQUIRED_LIBRARIES.  Run "cmake --help-policy CMP0075" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.
  CMAKE_REQUIRED_LIBRARIES is set to:
    /usr/lib/x86_64-linux-gnu/libjpeg.so
  For compatibility with CMake 3.11 and below this check is ignoring it.
Call Stack (most recent call first):
  /usr/local/share/cmake-3.24/Modules/CheckTypeSize.cmake:256 (check_include_file)
  /home/aistudio/dlib_build/dlib-19.0.0/dlib/cmake_find_blas.txt:58 (check_type_size)
  /home/aistudio/dlib_build/dlib-19.0.0/dlib/CMakeLists.txt:427 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.
-- 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
-- Found LAPACK library
-- Found ATLAS BLAS library
-- Looking for cblas_ddot
-- Looking for cblas_ddot - found
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")
-- *** cuDNN V5.0 OR GREATER NOT FOUND.  DLIB WILL NOT USE CUDA. ***
-- *** If you have cuDNN then set CMAKE_PREFIX_PATH to include cuDNN's folder.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/aistudio/dlib_build/dlib-19.0.0/tools/python/build
Build using cmake ...
[  1%] Building CXX object dlib_build/CMakeFiles/dlib.dir/base64/base64_kernel_1.cpp.o
[  2%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bigint/bigint_kernel_1.cpp.o
[  4%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bigint/bigint_kernel_2.cpp.o
[  5%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bit_stream/bit_stream_kernel_1.cpp.o
[  6%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_decoder/entropy_decoder_kernel_1.cpp.o
[  8%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_decoder/entropy_decoder_kernel_2.cpp.o
[  9%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_1.cpp.o
[ 11%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_2.cpp.o
[ 12%] Building CXX object dlib_build/CMakeFiles/dlib.dir/md5/md5_kernel_1.cpp.o
[ 13%] Building CXX object dlib_build/CMakeFiles/dlib.dir/tokenizer/tokenizer_kernel_1.cpp.o
[ 15%] Building CXX object dlib_build/CMakeFiles/dlib.dir/unicode/unicode.cpp.o
[ 16%] Building CXX object dlib_build/CMakeFiles/dlib.dir/data_io/image_dataset_metadata.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/data_io/../geometry/vector.h:12:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/data_io/../geometry/rectangle.h:11,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/data_io/../geometry.h:6,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/data_io/image_dataset_metadata.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/data_io/image_dataset_metadata.cpp:6:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/data_io/../geometry/../matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 18%] Building CXX object dlib_build/CMakeFiles/dlib.dir/data_io/mnist.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/data_io/../matrix.h:6:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/data_io/mnist.h:9,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/data_io/mnist.cpp:6:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/data_io/../matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 19%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dnn/cpu_dlib.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/dnn/../matrix.h:6:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/dnn/tensor.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/dnn/cpu_dlib.h:9,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/dnn/cpu_dlib.cpp:8:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/dnn/../matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 20%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dnn/tensor_tools.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/dnn/../matrix.h:6:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/dnn/tensor.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/dnn/tensor_tools.h:6,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/dnn/tensor_tools.cpp:6:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/dnn/../matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 22%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_kernel_1.cpp.o
[ 23%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bsp/bsp.cpp.o
[ 25%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_kernel_1.cpp.o
[ 26%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_kernel_2.cpp.o
[ 27%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_extensions.cpp.o
[ 29%] Building CXX object dlib_build/CMakeFiles/dlib.dir/linker/linker_kernel_1.cpp.o
[ 30%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/extra_logger_headers.cpp.o
[ 31%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/logger_kernel_1.cpp.o
[ 33%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/logger_config_file.cpp.o
[ 34%] Building CXX object dlib_build/CMakeFiles/dlib.dir/misc_api/misc_api_kernel_1.cpp.o
[ 36%] Building CXX object dlib_build/CMakeFiles/dlib.dir/misc_api/misc_api_kernel_2.cpp.o
[ 37%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_extensions.cpp.o
[ 38%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_kernel_2.cpp.o
[ 40%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockstreambuf/sockstreambuf.cpp.o
[ 41%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockstreambuf/sockstreambuf_unbuffered.cpp.o
[ 43%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_kernel.cpp.o
[ 44%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_iostream.cpp.o
[ 45%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_http.cpp.o
[ 47%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/multithreaded_object_extension.cpp.o
[ 48%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threaded_object_extension.cpp.o
[ 50%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_1.cpp.o
[ 51%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_2.cpp.o
[ 52%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_shared.cpp.o
[ 54%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/thread_pool_extension.cpp.o
[ 55%] Building CXX object dlib_build/CMakeFiles/dlib.dir/timer/timer.cpp.o
[ 56%] Building CXX object dlib_build/CMakeFiles/dlib.dir/stack_trace.cpp.o
[ 58%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/fonts.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/../geometry/vector.h:12:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/../geometry/rectangle.h:11,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/gui_core_kernel_2.h:20,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/xlib.h:4,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core.h:14,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/fonts.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/fonts.cpp:6:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/../geometry/../matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 59%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/widgets.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/../geometry/vector.h:12:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/../geometry/rectangle.h:11,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/gui_core_kernel_2.h:20,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/xlib.h:4,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core.h:14,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/drawable.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/widgets.h:9,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/widgets.cpp:6:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/../geometry/../matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 61%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/drawable.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/../geometry/vector.h:12:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/../geometry/rectangle.h:11,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/gui_core_kernel_2.h:20,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/xlib.h:4,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core.h:14,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/drawable.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/drawable.cpp:6:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/../geometry/../matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 62%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/canvas_drawing.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/../geometry/vector.h:12:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/../geometry/rectangle.h:11,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/gui_core_kernel_2.h:20,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/xlib.h:4,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core.h:14,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/canvas_drawing.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/canvas_drawing.cpp:6:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/../geometry/../matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 63%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/style.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/../geometry/vector.h:12:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/../geometry/rectangle.h:11,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/gui_core_kernel_2.h:20,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/xlib.h:4,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core.h:14,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/style.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/style.cpp:6:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/../geometry/../matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 65%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/base_widgets.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/../geometry/vector.h:12:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/../geometry/rectangle.h:11,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/gui_core_kernel_2.h:20,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/xlib.h:4,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core.h:14,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/drawable.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/base_widgets.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/base_widgets.cpp:6:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_widgets/../gui_core/../geometry/../matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 66%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_core/gui_core_kernel_1.cpp.o
[ 68%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_core/gui_core_kernel_2.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_core/../geometry/vector.h:12:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_core/../geometry/rectangle.h:11,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_core/gui_core_kernel_2.h:20,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_core/gui_core_kernel_2.cpp:9:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/gui_core/../geometry/../matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 69%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_loader/png_loader.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_loader/../array2d/../geometry/vector.h:12:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_loader/../array2d/../geometry/rectangle.h:11,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_loader/../array2d/array2d_kernel.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_loader/../array2d.h:7,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_loader/png_loader.cpp:9:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/image_loader/../array2d/../geometry/../matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 70%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_saver/save_png.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_saver/../sliding_buffer/../matrix/../array2d/../geometry/vector.h:12:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_saver/../sliding_buffer/../matrix/../array2d/../geometry/rectangle.h:11,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_saver/../sliding_buffer/../matrix/../array2d/array2d_kernel.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_saver/../sliding_buffer/../matrix/../array2d.h:7,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_saver/../sliding_buffer/../matrix/matrix_mat.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_saver/../sliding_buffer/circular_buffer.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_saver/../sliding_buffer.h:9,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_saver/../entropy_encoder_model.h:16,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_saver/image_saver.h:14,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_saver/save_png.h:7,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_saver/save_png.cpp:9:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/image_saver/../sliding_buffer/../matrix/../array2d/../geometry/../matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 72%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_loader/jpeg_loader.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_loader/../array2d/../geometry/vector.h:12:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_loader/../array2d/../geometry/rectangle.h:11,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_loader/../array2d/array2d_kernel.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_loader/../array2d.h:7,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_loader/jpeg_loader.cpp:9:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/image_loader/../array2d/../geometry/../matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 73%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_saver/save_jpeg.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_saver/../array2d/../geometry/vector.h:12:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_saver/../array2d/../geometry/rectangle.h:11,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_saver/../array2d/array2d_kernel.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_saver/../array2d.h:7,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/image_saver/save_jpeg.cpp:9:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/image_saver/../array2d/../geometry/../matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 75%] Linking CXX static library libdlib.a
[ 75%] Built target dlib
[ 76%] Building CXX object CMakeFiles/dlib_.dir/src/dlib.cpp.o
[ 77%] Building CXX object CMakeFiles/dlib_.dir/src/matrix.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix.h:6:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python/numpy_image.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/tools/python/src/matrix.cpp:4:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 79%] Building CXX object CMakeFiles/dlib_.dir/src/vector.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix.h:6:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python/numpy_image.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/tools/python/src/vector.cpp:4:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 80%] Building CXX object CMakeFiles/dlib_.dir/src/svm_c_trainer.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix.h:6:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python/numpy_image.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/tools/python/src/svm_c_trainer.cpp:4:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 81%] Building CXX object CMakeFiles/dlib_.dir/src/svm_rank_trainer.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix.h:6:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python/numpy_image.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/tools/python/src/svm_rank_trainer.cpp:4:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 83%] Building CXX object CMakeFiles/dlib_.dir/src/decision_functions.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix.h:6:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python/numpy_image.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/tools/python/src/decision_functions.cpp:4:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 84%] Building CXX object CMakeFiles/dlib_.dir/src/other.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix.h:6:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python/numpy_image.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/tools/python/src/other.cpp:4:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 86%] Building CXX object CMakeFiles/dlib_.dir/src/basic.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix.h:6:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python/numpy_image.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/tools/python/src/basic.cpp:3:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 87%] Building CXX object CMakeFiles/dlib_.dir/src/cca.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix.h:6:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python/numpy_image.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/tools/python/src/cca.cpp:4:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 88%] Building CXX object CMakeFiles/dlib_.dir/src/sequence_segmenter.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix.h:6:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python/numpy_image.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/tools/python/src/sequence_segmenter.cpp:4:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 90%] Building CXX object CMakeFiles/dlib_.dir/src/svm_struct.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix.h:6:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python/numpy_image.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/tools/python/src/svm_struct.cpp:4:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 91%] Building CXX object CMakeFiles/dlib_.dir/src/image.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix.h:6:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python/numpy_image.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/tools/python/src/image.cpp:1:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 93%] Building CXX object CMakeFiles/dlib_.dir/src/rectangles.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix.h:6:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python/numpy_image.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/tools/python/src/rectangles.cpp:4:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 94%] Building CXX object CMakeFiles/dlib_.dir/src/object_detection.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix.h:6:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python/numpy_image.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/tools/python/src/object_detection.cpp:4:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 95%] Building CXX object CMakeFiles/dlib_.dir/src/shape_predictor.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix.h:6:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python/numpy_image.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/tools/python/src/shape_predictor.cpp:4:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 97%] Building CXX object CMakeFiles/dlib_.dir/src/correlation_tracker.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix.h:6:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python/numpy_image.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/tools/python/src/correlation_tracker.cpp:4:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[ 98%] Building CXX object CMakeFiles/dlib_.dir/src/gui.cpp.o
In file included from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix.h:6:0,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python/numpy_image.h:8,
                 from /home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/python.h:10,
                 from /home/aistudio/dlib_build/dlib-19.0.0/tools/python/src/gui.cpp:3:
/home/aistudio/dlib_build/dlib-19.0.0/dlib/../dlib/matrix/matrix.h:1752:38: warning: dynamic exception specifications are deprecated in C++11 [-Wdeprecated]
             ~literal_assign_helper() throw (std::exception)
                                      ^~~~~
[100%] Linking CXX shared library dlib.so
[100%] Built target dlib_
Install the project...
-- Install configuration: "Release"
-- Installing: /home/aistudio/dlib_build/dlib-19.0.0/tools/python/../../python_examples/dlib.so
-- Set runtime path of "/home/aistudio/dlib_build/dlib-19.0.0/tools/python/../../python_examples/dlib.so" to ""
Populating the distribution directory /home/aistudio/dlib_build/dlib-19.0.0/./dist/dlib ...
Copying file /home/aistudio/dlib_build/dlib-19.0.0/./python_examples/svm_rank.py -> /home/aistudio/dlib_build/dlib-19.0.0/./dist/dlib/examples/svm_rank.py.
Copying file /home/aistudio/dlib_build/dlib-19.0.0/./python_examples/sequence_segmenter.py -> /home/aistudio/dlib_build/dlib-19.0.0/./dist/dlib/examples/sequence_segmenter.py.
Copying file /home/aistudio/dlib_build/dlib-19.0.0/./python_examples/face_landmark_detection.py -> /home/aistudio/dlib_build/dlib-19.0.0/./dist/dlib/examples/face_landmark_detection.py.
Copying file /home/aistudio/dlib_build/dlib-19.0.0/./python_examples/train_shape_predictor.py -> /home/aistudio/dlib_build/dlib-19.0.0/./dist/dlib/examples/train_shape_predictor.py.
Copying file /home/aistudio/dlib_build/dlib-19.0.0/./python_examples/svm_struct.py -> /home/aistudio/dlib_build/dlib-19.0.0/./dist/dlib/examples/svm_struct.py.
Copying file /home/aistudio/dlib_build/dlib-19.0.0/./python_examples/correlation_tracker.py -> /home/aistudio/dlib_build/dlib-19.0.0/./dist/dlib/examples/correlation_tracker.py.
Copying file /home/aistudio/dlib_build/dlib-19.0.0/./python_examples/train_object_detector.py -> /home/aistudio/dlib_build/dlib-19.0.0/./dist/dlib/examples/train_object_detector.py.
Copying file /home/aistudio/dlib_build/dlib-19.0.0/./python_examples/face_detector.py -> /home/aistudio/dlib_build/dlib-19.0.0/./dist/dlib/examples/face_detector.py.
Copying file /home/aistudio/dlib_build/dlib-19.0.0/./python_examples/find_candidate_object_locations.py -> /home/aistudio/dlib_build/dlib-19.0.0/./dist/dlib/examples/find_candidate_object_locations.py.
Copying file /home/aistudio/dlib_build/dlib-19.0.0/./python_examples/max_cost_assignment.py -> /home/aistudio/dlib_build/dlib-19.0.0/./dist/dlib/examples/max_cost_assignment.py.
Copying file /home/aistudio/dlib_build/dlib-19.0.0/./python_examples/dlib.so -> /home/aistudio/dlib_build/dlib-19.0.0/./dist/dlib/dlib.so.
Copying file /home/aistudio/dlib_build/dlib-19.0.0/./python_examples/LICENSE_FOR_EXAMPLE_PROGRAMS.txt -> /home/aistudio/dlib_build/dlib-19.0.0/./dist/dlib/examples/LICENSE_FOR_EXAMPLE_PROGRAMS.txt.
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/dlib
copying dist/dlib/__init__.py -> build/lib.linux-x86_64-3.7/dlib
running egg_info
creating dist/dlib.egg-info
writing dist/dlib.egg-info/PKG-INFO
writing dependency_links to dist/dlib.egg-info/dependency_links.txt
writing top-level names to dist/dlib.egg-info/top_level.txt
writing manifest file 'dist/dlib.egg-info/SOURCES.txt'
reading manifest file 'dist/dlib.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '**' found under directory 'dlib/test'
warning: no previously-included files matching '**' found under directory 'dlib/build'
warning: no files found matching '*.bat' under directory 'python_examples'
warning: no previously-included files matching '**' found under directory 'python_examples/build'
writing manifest file 'dist/dlib.egg-info/SOURCES.txt'
copying dist/dlib/dlib.so -> build/lib.linux-x86_64-3.7/dlib
creating build/lib.linux-x86_64-3.7/dlib/examples
copying dist/dlib/examples/LICENSE_FOR_EXAMPLE_PROGRAMS.txt -> build/lib.linux-x86_64-3.7/dlib/examples
copying dist/dlib/examples/__init__.py -> build/lib.linux-x86_64-3.7/dlib/examples
copying dist/dlib/examples/correlation_tracker.py -> build/lib.linux-x86_64-3.7/dlib/examples
copying dist/dlib/examples/face_detector.py -> build/lib.linux-x86_64-3.7/dlib/examples
copying dist/dlib/examples/face_landmark_detection.py -> build/lib.linux-x86_64-3.7/dlib/examples
copying dist/dlib/examples/find_candidate_object_locations.py -> build/lib.linux-x86_64-3.7/dlib/examples
copying dist/dlib/examples/max_cost_assignment.py -> build/lib.linux-x86_64-3.7/dlib/examples
copying dist/dlib/examples/sequence_segmenter.py -> build/lib.linux-x86_64-3.7/dlib/examples
copying dist/dlib/examples/svm_rank.py -> build/lib.linux-x86_64-3.7/dlib/examples
copying dist/dlib/examples/svm_struct.py -> build/lib.linux-x86_64-3.7/dlib/examples
copying dist/dlib/examples/train_object_detector.py -> build/lib.linux-x86_64-3.7/dlib/examples
copying dist/dlib/examples/train_shape_predictor.py -> build/lib.linux-x86_64-3.7/dlib/examples
running build_ext
running build_ext
Creating /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/dlib.egg-link (link to dist)
Adding dlib 19.0.0 to easy-install.pth file

Installed /home/aistudio/dlib_build/dlib-19.0.0/dist
Processing dependencies for dlib==19.0.0
Finished processing dependencies for dlib==19.0.0

根据您提供的构建日志,整个编译安装过程是成功的。这里是一些关键点的总结:

  1. CMake 配置:CMake 配置阶段成功完成,尽管有一些警告信息,但没有错误。警告主要是关于 CMake 版本和动态异常规范的弃用。

  2. 编译过程:编译过程逐步完成了各个源文件的编译,并且链接生成了 libdlib.adlib.so

  3. Python 绑定:Python 绑定也成功编译,生成了 dlib.so 文件,这个文件是 Python 调用 dlib 功能的核心。

  4. 安装:项目安装阶段将编译生成的文件复制到了正确的位置,包括 Python 绑定和示例程序。

  5. 环境设置:在 /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/ 下创建了 dlib.egg-link,这是一个符号链接,指向了安装的 dlibdist 目录。

  6. 依赖处理:最后,setuptools 处理了 dlib 的依赖项,并完成了安装。

根据提供的日志信息,这里有几个关键点需要注意:

  1. Boost 版本问题:CMake 警告指出没有为 python-py34 定义头文件,这表明它在尝试寻找为 Python 3.4 编译的 Boost 版本。然而,你的环境使用的是 Python 3.7,因此需要为 Python 3.7 找到或编译相应的 Boost 库。

  2. Boost 库未找到:尽管 CMake 找到了 Boost 的基础版本(1.58.0),但它没有找到特定于 Python 3.4 的 Boost 组件。这是因为 Boost.Python 库通常是针对特定版本的 Python 编译的。

  3. Python 版本:日志显示系统使用的是 Python 3.7,因此需要一个与之兼容的 Boost.Python 库。

  4. CMake 弃用警告:CMake 配置文件中的 cmake_minimum_required 版本较低,CMake 建议更新这个版本值以确保与当前版本的 CMake 兼容。

  5. C++11 激活:CMake 配置已激活 C++11 支持。

解决步骤:

  1. 确认 Python 版本:确保你使用的是 Python 3.7。

  2. 查找 Boost.Python 库:使用 ldconfig 或在系统中搜索,找到为 Python 3.7 编译的 Boost.Python 库。

  3. 安装 Boost.Python:如果系统中没有为 Python 3.7 编译的 Boost.Python 库,你需要安装或编译它。可以使用包管理器安装或从源代码编译。

    • 使用包管理器(以 Ubuntu 为例):
       

      bash

      sudo apt-get install libboost-python3.7-dev

  4. 设置环境变量:如果系统中存在多个版本的 Boost.Python 库,可能需要通过设置 LD_LIBRARY_PATH 环境变量来指定正确的库路径。

  5. 重新编译 dlib:如果 dlib 是使用错误的 Boost.Python 库编译的,你可能需要重新编译 dlib,确保在编译时使用正确的 Boost 库。

  6. 使用虚拟环境:考虑使用 Python 虚拟环境来避免系统级别的库冲突。

  7. 更新 CMakeLists.txt:如果可能,更新项目的 CMakeLists.txt 文件,以避免 CMake 弃用警告,并确保它使用正确的 Boost 组件。

  8. 清理旧的 Boost 库:如果有旧的或错误的 Boost.Python 库,你可能需要清理它们。

  9. 重启:在更改库文件或环境变量后,可能需要重启你的终端会话或计算机以使更改生效。

通过上述步骤,你应该能够解决由于 Boost.Python 库不兼容导致的导入错误。如果问题依旧存在,可能需要更深入地检查你的系统配置。

解决 ImportError 问题

尽管 dlib 已经安装成功,但如果您在尝试导入时遇到 ImportError,这可能是因为:

  • Python 环境问题:确保您在正确的 Python 环境中工作,并且该环境中安装了 dlib
  • 动态链接库的路径:如果 Python 无法找到 dlib.so,您可能需要将库的路径添加到 LD_LIBRARY_PATH 环境变量中。
  • 不兼容的 Boost.Python 库:如果系统中存在为 Python 2.7 编译的 Boost.Python 库,而您使用的是 Python 3.x,这可能会导致问题。确保 Boost.Python 库与您的 Python 版本兼容。

验证安装

要验证 dlib 是否正确安装并能够被 Python 正确导入,您可以在 Python 解释器中执行以下命令:

 

python

import dlib print(dlib.__version__)

如果 dlib 能够被成功导入,上述代码将打印出 dlib 的版本号。如果导入失败,请检查您的 Python 环境配置,并确保没有其他版本的 dlib 或 Boost.Python 库干扰当前环境。

import sys
sys.path.append('/home/aistudio/dlib_build/dlib-19.0.0/dist')
import dlib
print(dlib.__version__)

---------------------------------报错------------------------------------------

ImportError                               Traceback (most recent call last)/tmp/ipykernel_94/1842467836.py in <module>
      1 import sys
      2 sys.path.append('/home/aistudio/dlib_build/dlib-19.0.0/dist')
----> 3 import dlib
      4 print(dlib.__version__)
~/dlib_build/dlib-19.0.0/dist/dlib/__init__.py in <module>
----> 1 from .dlib import *
      2 __version__ = "19.0.0"
ImportError: /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.58.0: undefined symbol: PyClass_Type

----------------------------------------------------------------------------------------------------------

Boost.Python 是一个用于实现 C++ 和 Python 之间互操作性的库,它的主要功能包括
参考Boost之Python_boost python-CSDN博客

遇到这种由于 Boost.Python 库与 Python 版本不兼容导致的 ImportError,通常需要确保 Boost.Python 库是为当前使用的 Python 版本编译的。以下是一些解决步骤:

  1. 找出当前环境中的 Boost.Python 库: 使用 ldconfig 命令或通过文件搜索找出系统中所有 Boost.Python 库的位置。

     

    bash

    ldconfig -p | grep libboost_python


    结果是
     

    	libboost_python-py35.so.1.58.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libboost_python-py35.so.1.58.0
    	libboost_python-py35.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libboost_python-py35.so
    	libboost_python-py27.so.1.58.0 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.58.0
    	libboost_python-py27.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libboost_python-py27.so

  2. 确认 Python 版本: 确认你使用的 Python 版本。如果你使用的是 Python 3.x,你需要一个为 Python 3 编译的 Boost.Python 库。

     

    bash

    python3 --version

  3. 安装或编译 Boost.Python: 如果系统中没有为 Python 3 编译的 Boost.Python 库,你需要安装或编译一个。可以使用包管理器安装或从源代码编译 Boost 库。

    • 使用包管理器(以 Ubuntu 为例):

       

      bash

      sudo apt-get install libboost-python1.58-dev # 适用于 Python 2.7
      sudo apt-get install libboost-python3.7-dev # 适用于 Python 3.7

    • 从源代码编译: 如果你需要特定版本的 Boost 或需要在没有预编译包的系统上安装,你可能需要从源代码编译 Boost。确保在编译时使用正确的 Python 版本。

  4. 设置环境变量: 如果系统中存在多个版本的 Boost.Python 库,可能需要通过设置 LD_LIBRARY_PATH 环境变量来指定正确的库路径。

     

    bash

    export LD_LIBRARY_PATH=/path/to/correct/lib:$LD_LIBRARY_PATH

  5. 重新编译 dlib: 如果 dlib 是使用错误的 Boost.Python 库编译的,你可能需要重新编译 dlib,确保在编译时使用正确的 Boost 库。

  6. 使用虚拟环境: 考虑使用 Python 虚拟环境来避免系统级别的库冲突。在虚拟环境中,你可以控制 Boost.Python 库和 dlib 的安装。

     

    bash

    python3 -m venv venv source venv/bin/activate pip install dlib # 或者使用其他方法安装 dlib

  7. 检查符号链接: 确保 /usr/lib/x86_64-linux-gnu/libboost_python.so 符号链接指向正确的 Boost.Python 库版本。

  8. 清理旧的 Boost 库: 如果系统中有旧的或错误的 Boost.Python 库,你可能需要清理它们,以防止它们被错误地加载。

  9. 重启: 在更改库文件或环境变量后,可能需要重启你的终端会话或计算机以使更改生效。

通过上述步骤,你应该能够解决由于 Boost.Python 库不兼容导致的导入错误。如果问题依旧存在,可能需要更深入地检查你的系统配置。

================================================================

因为百度飞将 aistudio 不支持 apt-get install 

我在考虑是否用3.5代替 3.7

 

libboost_python-py35.so libboost_python-py37.so

这个问题是在寻找特定的Boost Python库版本,用于Python 3.5和Python 3.7。libboost_python-py35.solibboost_python-py37.so是共享库文件,它们提供了C++和Python之间的接口。

解决方案:

  1. 安装Boost库。

    你需要确保Boost Python库已经安装在你的系统上。你可以使用包管理器来安装,例如在Ubuntu上使用apt-get

     
     

    sudo apt-get install libboost-python-dev

    这将会安装支持Python 2和3的库。如果你需要特定版本的Python支持,你可能需要编译Boost库,指定Python版本。

  2. 如果你需要Python 3.5和3.7特定的版本,你可能需要从Boost的源代码编译库,并且在编译时指定Python版本。

    例如,使用Boost.Python bjam工具:

     
     

    bjam --with-python link=shared variant=release threading=multi

    这将会编译并且创建共享库,但是你需要确保bjam能找到正确的Python版本。

  3. 如果你已经有了库文件,你可能需要设置LD_LIBRARY_PATH环境变量,或者将库文件放在标准的库文件路径下,例如/usr/lib/usr/local/lib

    例如,你可以这样设置LD_LIBRARY_PATH

     
     

    export LD_LIBRARY_PATH=/path/to/your/library:$LD_LIBRARY_PATH

    或者将库文件复制到标准路径下。

  4. 如果你是在编写Python代码,并且你需要导入这些库,你可以使用ctypes或者cffi库在你的Python代码中加载这些共享库。

    例如,使用ctypes

     
     

    import ctypes

    ctypes.cdll.LoadLibrary('/path/to/libboost_python-py35.so')

    请注意,你需要替换/path/to/为你的库文件实际的路径。

总结:

  • 确保Boost Python库已经安装。

  • 如果需要特定Python版本支持,从源代码编译Boost库并指定Python版本。

  • 设置LD_LIBRARY_PATH环境变量或将库文件放在标准路径下。

  • 在Python代码中使用ctypescffi加载共享库。

    ====================================================

  • 7
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
c++中两个方法只有一个地方调用了设置类不同属性的函数,如何优化这两个代码:void ZMMapImp::SetSingleSlotStatus(const DTYPE_FEATURE_ID slotId, enum SLOT_STATUS status) { if (slotId == INVALID_SLOTID) { ZINFO << "SetSlotStatus SlotID not valid : " << slotId; return; } auto parkingId = dblib::UnpackParkingId(dblib::UnpackMapId(slotId)); auto virMap = dblib::VmManager::Instance().GetVMap(parkingId); auto localMap = dblib::VmManager::Instance().GetVLocalMap(dblib::UnpackMapId(slotId)); RETURN_IF_NULL(virMap) RETURN_IF_NULL(localMap) virMap->SetSlotStatus(slotId, status); const dblib::VMSlot* vmSlot = virMap->GetSlot(slotId); if (vmSlot != nullptr) { SlotInfo destSlot; ConvertSlotInfo(vmSlot, localMap->GetZlevel(), localMap->GetRampId(), destSlot); m_defaultTask->RtdMgr()->AddVmSlot(destSlot); } } void ZMMapImp::SetSingleSlotAvailable(const DTYPE_FEATURE_ID slotId, SLOT_AVAILABLE_STATUS status) { if (slotId == INVALID_SLOTID) { ZINFO << "SetSlotStatus SlotID not valid : " << slotId; return; } auto parkingId = dblib::UnpackParkingId(dblib::UnpackMapId(slotId)); auto virMap = dblib::VmManager::Instance().GetVMap(parkingId); auto localMap = dblib::VmManager::Instance().GetVLocalMap(dblib::UnpackMapId(slotId)); RETURN_IF_NULL(virMap) RETURN_IF_NULL(localMap) virMap->SetSlotAvailableStatus(slotId, status); const dblib::VMSlot* vmSlot = virMap->GetSlot(slotId); if (vmSlot != nullptr) { SlotInfo destSlot; ConvertSlotInfo(vmSlot, localMap->GetZlevel(), localMap->GetRampId(), destSlot); m_defaultTask->RtdMgr()->AddVmSlot(destSlot); } }
06-14
可以将这两个方法中的相同部分提取出来,封装成一个私有函数,然后在两个方法中分别调用这个函数即可。具体的实现可以参考下面的示例代码: ``` void ZMMapImp::UpdateSlotStatus(const DTYPE_FEATURE_ID slotId, std::function<void(dblib::VMSlot*)> updateFunc) { if (slotId == INVALID_SLOTID) { ZINFO << "UpdateSlotStatus SlotID not valid : " << slotId; return; } auto parkingId = dblib::UnpackParkingId(dblib::UnpackMapId(slotId)); auto virMap = dblib::VmManager::Instance().GetVMap(parkingId); auto localMap = dblib::VmManager::Instance().GetVLocalMap(dblib::UnpackMapId(slotId)); RETURN_IF_NULL(virMap) RETURN_IF_NULL(localMap) auto vmSlot = virMap->GetSlot(slotId); if (vmSlot != nullptr) { updateFunc(vmSlot); SlotInfo destSlot; ConvertSlotInfo(vmSlot, localMap->GetZlevel(), localMap->GetRampId(), destSlot); m_defaultTask->RtdMgr()->AddVmSlot(destSlot); } } void ZMMapImp::SetSingleSlotStatus(const DTYPE_FEATURE_ID slotId, enum SLOT_STATUS status) { UpdateSlotStatus(slotId, [status](dblib::VMSlot* vmSlot) { vmSlot->SetSlotStatus(status); }); } void ZMMapImp::SetSingleSlotAvailable(const DTYPE_FEATURE_ID slotId, SLOT_AVAILABLE_STATUS status) { UpdateSlotStatus(slotId, [status](dblib::VMSlot* vmSlot) { vmSlot->SetSlotAvailableStatus(status); }); } ``` 在这个实现中,我定义了一个名为 `UpdateSlotStatus` 的私有函数,用于更新车位的状态或可用状态。这个函数接受两个参数:车位 ID 和一个函数对象 `updateFunc`,用于更新车位状态。函数对象 `updateFunc` 的参数是一个指向 `dblib::VMSlot` 类型的指针,表示要更新的车位。在 `SetSingleSlotStatus` 和 `SetSingleSlotAvailable` 方法中,我分别调用了 `UpdateSlotStatus` 函数,同时传递不同的 `updateFunc` 参数,以实现更新车位状态或可用状态的功能。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值