- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试安装 dlib 以安装 python 包 face_recognition。这样做时我遇到了以下错误:
ubuntu:~/dlib$ sudo python3 setup.py install --yes USE_AVX_INSTRUCTIONS
running install
running bdist_egg
running egg_info
creating dlib.egg-info
writing dlib.egg-info/PKG-INFO
writing dependency_links to dlib.egg-info/dependency_links.txt
writing top-level names to dlib.egg-info/top_level.txt
writing manifest file 'dlib.egg-info/SOURCES.txt'
package init file 'dlib/__init__.py' not found (or not a regular file)
reading manifest file 'dlib.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'dlib.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
Invoking CMake setup: 'cmake /home/ubuntu/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/home/ubuntu/dlib/build/lib.linux-x86_64-3.6 -DPYTHON_EXECUTABLE=/usr/bin/python3 -DUSE_AVX_INSTRUCTIONS=yes -DCMAKE_BUILD_TYPE=Release'
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/bin/python3 (found version "3.6.7")
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.6m.so
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.3.dev0
-- Enabling AVX instructions
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- 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
-- 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
-- Found X11: /usr/lib/x86_64-linux-gnu/libX11.so
-- 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
-- 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.3
-- 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
-- Found LAPACK library
-- Found ATLAS BLAS library
-- Looking for cblas_ddot
-- Looking for cblas_ddot - found
-- Looking for sgesv
-- Looking for sgesv - not found
-- Looking for sgesv_
-- Looking for sgesv_ - 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")
-- Disabling CUDA support for dlib. DLIB WILL NOT USE CUDA
-- C++11 activated.
-- Found Python with installed numpy package
-- Numpy include path '/usr/lib/python3/dist-packages/numpy/core/include'
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/dlib/build/temp.linux-x86_64-3.6
Invoking CMake build: 'cmake --build . --config Release -- -j1'
Scanning dependencies of target dlib
[ 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
[ 3%] 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
[ 7%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_decoder/entropy_decoder_kernel_2.cpp.o
[ 8%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_1.cpp.o
[ 10%] Building CXX object dlib_build/CMakeFiles/dlib.dir/entropy_encoder/entropy_encoder_kernel_2.cpp.o
[ 11%] Building CXX object dlib_build/CMakeFiles/dlib.dir/md5/md5_kernel_1.cpp.o
[ 12%] Building CXX object dlib_build/CMakeFiles/dlib.dir/tokenizer/tokenizer_kernel_1.cpp.o
[ 14%] Building CXX object dlib_build/CMakeFiles/dlib.dir/unicode/unicode.cpp.o
[ 15%] Building CXX object dlib_build/CMakeFiles/dlib.dir/data_io/image_dataset_metadata.cpp.o
[ 16%] Building CXX object dlib_build/CMakeFiles/dlib.dir/data_io/mnist.cpp.o
[ 17%] Building CXX object dlib_build/CMakeFiles/dlib.dir/global_optimization/global_function_search.cpp.o
[ 19%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_kernel_1.cpp.o
[ 20%] Building CXX object dlib_build/CMakeFiles/dlib.dir/bsp/bsp.cpp.o
[ 21%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_kernel_1.cpp.o
[ 23%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_kernel_2.cpp.o
[ 24%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dir_nav/dir_nav_extensions.cpp.o
[ 25%] Building CXX object dlib_build/CMakeFiles/dlib.dir/linker/linker_kernel_1.cpp.o
[ 26%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/extra_logger_headers.cpp.o
[ 28%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/logger_kernel_1.cpp.o
[ 29%] Building CXX object dlib_build/CMakeFiles/dlib.dir/logger/logger_config_file.cpp.o
[ 30%] Building CXX object dlib_build/CMakeFiles/dlib.dir/misc_api/misc_api_kernel_1.cpp.o
[ 32%] Building CXX object dlib_build/CMakeFiles/dlib.dir/misc_api/misc_api_kernel_2.cpp.o
[ 33%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_extensions.cpp.o
[ 34%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockets/sockets_kernel_2.cpp.o
[ 35%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockstreambuf/sockstreambuf.cpp.o
[ 37%] Building CXX object dlib_build/CMakeFiles/dlib.dir/sockstreambuf/sockstreambuf_unbuffered.cpp.o
[ 38%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_kernel.cpp.o
[ 39%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_iostream.cpp.o
[ 41%] Building CXX object dlib_build/CMakeFiles/dlib.dir/server/server_http.cpp.o
[ 42%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/multithreaded_object_extension.cpp.o
[ 43%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threaded_object_extension.cpp.o
[ 44%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_1.cpp.o
[ 46%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_2.cpp.o
[ 47%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/threads_kernel_shared.cpp.o
[ 48%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/thread_pool_extension.cpp.o
[ 50%] Building CXX object dlib_build/CMakeFiles/dlib.dir/threads/async.cpp.o
[ 51%] Building CXX object dlib_build/CMakeFiles/dlib.dir/timer/timer.cpp.o
[ 52%] Building CXX object dlib_build/CMakeFiles/dlib.dir/stack_trace.cpp.o
[ 53%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dnn/cpu_dlib.cpp.o
[ 55%] Building CXX object dlib_build/CMakeFiles/dlib.dir/dnn/tensor_tools.cpp.o
[ 56%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/fonts.cpp.o
[ 57%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/widgets.cpp.o
[ 58%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/drawable.cpp.o
[ 60%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/canvas_drawing.cpp.o
[ 61%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/style.cpp.o
[ 62%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_widgets/base_widgets.cpp.o
[ 64%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_core/gui_core_kernel_1.cpp.o
[ 65%] Building CXX object dlib_build/CMakeFiles/dlib.dir/gui_core/gui_core_kernel_2.cpp.o
[ 66%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_loader/png_loader.cpp.o
[ 67%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_saver/save_png.cpp.o
[ 69%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_loader/jpeg_loader.cpp.o
[ 70%] Building CXX object dlib_build/CMakeFiles/dlib.dir/image_saver/save_jpeg.cpp.o
[ 71%] Linking CXX static library libdlib.a
[ 71%] Built target dlib
Scanning dependencies of target dlib_python
[ 73%] Building CXX object CMakeFiles/dlib_python.dir/src/dlib.cpp.o
[ 74%] Building CXX object CMakeFiles/dlib_python.dir/src/matrix.cpp.o
[ 75%] Building CXX object CMakeFiles/dlib_python.dir/src/vector.cpp.o
[ 76%] Building CXX object CMakeFiles/dlib_python.dir/src/svm_c_trainer.cpp.o
[ 78%] Building CXX object CMakeFiles/dlib_python.dir/src/svm_rank_trainer.cpp.o
[ 79%] Building CXX object CMakeFiles/dlib_python.dir/src/decision_functions.cpp.o
[ 80%] Building CXX object CMakeFiles/dlib_python.dir/src/other.cpp.o
[ 82%] Building CXX object CMakeFiles/dlib_python.dir/src/basic.cpp.o
cc1plus: out of memory allocating 8388608 bytes after a total of 54640640 bytes
CMakeFiles/dlib_python.dir/build.make:230: recipe for target 'CMakeFiles/dlib_python.dir/src/basic.cpp.o' failed
make[2]: *** [CMakeFiles/dlib_python.dir/src/basic.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/dlib_python.dir/all' failed
make[1]: *** [CMakeFiles/dlib_python.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "setup.py", line 238, in <module>
'Topic :: Software Development',
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/usr/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 67, in run
self.do_egg_install()
File "/usr/lib/python3/dist-packages/setuptools/command/install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py", line 172, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "/usr/lib/python3/dist-packages/setuptools/command/bdist_egg.py", line 158, in call_command
self.run_command(cmdname)
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/usr/lib/python3/dist-packages/setuptools/command/install_lib.py", line 24, in run
self.build()
File "/usr/lib/python3.6/distutils/command/install_lib.py", line 109, in build
self.run_command('build_ext')
File "/usr/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/usr/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "setup.py", line 119, in run
self.build_extension(ext)
File "setup.py", line 155, in build_extension
subprocess.check_call(cmake_build, cwd=build_folder)
File "/usr/lib/python3.6/subprocess.py", line 291, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j1']' returned non-zero exit status 2.
我通过 AWS EC2 免费试用在 Ubuntu 18.04 上运行它,所以我没有太多内存 (1GB),这可能是问题所在,因为它提到了内存分配问题?目前我真的无能为力,如果这是问题所在,有什么办法可以在不使用太多的情况下安装它吗?或者,如果这不是问题所在,我该如何解决?
谢谢。
编辑:我可以分配更多的虚拟内存吗?
最佳答案
暂时使用更高内存/CPU 的服务器 (t3.medium) 并执行以下操作使其正常工作:
apt-get install -y --fix-missing \
build-essential \
cmake \
gfortran \
git \
wget \
curl \
graphicsmagick \
libgraphicsmagick1-dev \
libatlas-dev \
libavcodec-dev \
libavformat-dev \
libgtk2.0-dev \
libjpeg-dev \
liblapack-dev \
libswscale-dev \
pkg-config \
python3-dev \
python3-numpy \
software-properties-common \
zip \
&& apt-get clean && rm -rf /tmp/* /var/tmp/*
git clone https://github.com/davisking/dlib.git
cd dlib
mkdir build; cd build; cmake ..; cmake --build .
cd ..
python3 setup.py install
pip3 install face_recognition
关于python - cc1plus : out of memory when building dlib,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55286698/
在 ARM 中,内存类型指定为: 正常 设备 强烈有序 在Device type里面,好像这个类型也可以区分 不可共享的设备内存 可共享设备内存 不可共享和可共享设备内存有什么区别?我们如何分别使用这
在 ARM 中,内存类型指定为: 正常 设备 强烈有序 在Device type里面,好像这个类型也可以区分 不可共享的设备内存 可共享设备内存 不可共享和可共享设备内存有什么区别?我们如何分别使用这
This diagram很清楚不同YARN和Spark内存相关设置之间的关系,除了spark.python.worker.memory。 spark.python.worker.memory 如何适应
我正在尝试使用复杂的if-else决策树来实现GLSL片段着色器。不幸的是,着色器编译器很早就失败,并出现“语法错误-内存耗尽”错误。 GLSL中的代码大小或决策树深度是否有任何限制?有什么建议如何克
什么是“标记内存”,它如何帮助减小程序大小? 最佳答案 您可能指的是 tagged union ,或更具体地说是硬件实现,如 LISP 机器中使用的标记架构。基本上是一种存储具有类型信息的数据的方法。
我的内存有问题。我不明白为什么当我的程序长时间运行时 Go 使用越来越多的内存(从不释放它)。 第一次分配后,程序使用了将近 9 MB 的内存。然后在 12 小时后,它开始以指数方式使用更多内存,直到
在 Windows 机器上,MATLAB 用户可以使用 memory或 feature memstats命令。但是,这些都不能在机器上工作,失败如下: >> memory??? Error using
引导 Linux 内核时,可以在 RAM 中加载 initramfs 存档和 DTB 文件,并将这些物理地址指定给内核。例如,使用 U-Boot,您可以执行以下操作: bootz 0x80008000
我正在学习虚拟内存的概念,但是这个问题让我困惑了一段时间。由于大多数现代计算机都使用虚拟内存,因此当程序正在执行时,操作系统应该在 RAM 和磁盘之间将数据分页进出。但为什么我们仍然遇到“内存不足”的
我在 Colab Pro+(使用高 RAM 选项)上运行神经网络时发现了这个问题。 运行时错误:CUDA 内存不足。尝试分配 8.00 GiB(GPU 0;15.90 GiB 总容量;12.04 Gi
当我在任何地方阅读基于操作系统的书籍时,考虑到时间限制和开销很高,从内存和 I\O(子系统)获取数据是昂贵的,这就是为什么在某些硬件制造商中提供一些其他方式来访问它们,如ARM7 some ISAs像
据我所知,ADS v.10 尝试将查询结果保留在内存中,直到它变得非常大。对于 __output 表和临时表也应该如此。当结果变大时,交换声明。 问题是为查询、 worker 等设置了什么内存限制?可
序言 我正在写一个小演示文稿来列出使用 Docker 时的一些“陷阱”,我也遇到了自己的一个问题。 在解释让 Docker 在没有内存限制的情况下运行的危险时,我发现它的行为不像我预期的那样。 我使用
我们有一个 ASP.NET 项目(40 个左右的 Web 表单、50 个表、相当标准的 IO 内容,并尽可能减少),很快需要部署。系统上大约有 100 个并发用户,但任何时候只有大约 20 个用户在使
我在 dotcloud 上使用 redis 内存存储,但尽管 key 已过期,但它的 used_memory 再也不会下降。从 redis-cli 使用 flushdb 或 flushall 不会导致
我使用的是 Xcode 10.2.1 和 macOS Catalina Developer Beta 2。每当我尝试使用内存图调试器时,我都会收到此错误: Memory Graph Debugger:
所以我一直在寻找这个问题的解决方案有一段时间了。我编写了一个程序来从两个单独的文本文件中获取数据,对其进行解析,然后输出到另一个文本文件和一个 ARFF 文件以供 Weka 分析。我遇到的问题是我编写
对不起,我对 erlang 文档中的以下描述不太清楚: erlang:memory() -> [{Type, Size}] with Type: "total" means: "The total a
在查看示例合约时,有时会在带有“内存”的方法中声明数组,有时则不会。有什么区别? 最佳答案 如果没有内存关键字,Solidity会尝试在存储中声明变量。 首席 Solidity 开发者 chriset
我不明白Matlab并行计算工具箱中的parfor cicle是如何与内存一起工作的:我读到它在所有worker之间共享内存(然后我认为每个worker(核心)都可以访问感兴趣的内存位置而无需制作本地
我是一名优秀的程序员,十分优秀!