Python 安装dlib需要多大尺寸的aws ec2?
我正在尝试启动一个ubuntu ec2实例,我需要安装dlib。我正在尝试使用命令Python 安装dlib需要多大尺寸的aws ec2?,python,amazon-web-services,opencv,amazon-ec2,dlib,Python,Amazon Web Services,Opencv,Amazon Ec2,Dlib,我正在尝试启动一个ubuntu ec2实例,我需要安装dlib。我正在尝试使用命令pip install dlib,安装正在中断 我使用的是Ubuntu深度学习AMI,因为它已经安装了cv2和其他我需要的软件包。我从p2.large开始,但改为p2.xlarge,因为这篇文章建议获得更多的RAM来安装dlib 然而,这并没有起作用 有什么想法吗 以下是错误消息: Collecting dlib Using cached dlib-19.21.1.tar.gz (3.6 MB) Buildi
pip install dlib
,安装正在中断
我使用的是Ubuntu深度学习AMI,因为它已经安装了cv2和其他我需要的软件包。我从p2.large开始,但改为p2.xlarge,因为这篇文章建议获得更多的RAM来安装dlib
然而,这并没有起作用
有什么想法吗
以下是错误消息:
Collecting dlib
Using cached dlib-19.21.1.tar.gz (3.6 MB)
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-dj_f226q
cwd: /tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/
Complete output (537 lines):
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.6.10 |Anaconda, Inc.| (default, Jan 7 2020, 21:14:29)
Invoking CMake setup: 'cmake /tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/build/lib.linux-x86_64-3.6 -DPYTHON_EXECUTABLE=/home/ubuntu/anaconda3/envs/pytorch_p36/bin/python -DCMAKE_BUILD_TYPE=Release'
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/x86_64-conda_cos6-linux-gnu-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: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/x86_64-conda_cos6-linux-gnu-c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/python (found version "3.6.10")
-- Found PythonLibs: /home/ubuntu/anaconda3/envs/pytorch_p36/lib/libpython3.6m.so
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.2.4
-- Using CMake version: 3.18.4
-- Compiling dlib version: 19.21.1
-- SSE4 instructions can be executed by the host processor.
-- AVX instructions can be executed by the host processor.
-- Enabling AVX instructions
-- Looking for pthread.h
-- Looking for pthread.h - found
-- 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
-- Could NOT find X11 (missing: X11_X11_LIB)
*****************************************************************************
*** DLIB GUI SUPPORT DISABLED BECAUSE X11 DEVELOPMENT LIBRARIES NOT FOUND ***
*** Make sure libx11-dev is installed if you want GUI support. ***
*** On Ubuntu run: sudo apt-get install libx11-dev ***
*****************************************************************************
-- Found system copy of libpng: /home/ubuntu/anaconda3/envs/pytorch_p36/lib/libpng.so;/home/ubuntu/anaconda3/envs/pytorch_p36/lib/libz.so
-- Found system copy of libjpeg: /home/ubuntu/anaconda3/envs/pytorch_p36/lib/libjpeg.so
-- 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 cblas_ddot
-- Looking for cblas_ddot - not found
-- 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 Intel MKL BLAS/LAPACK library
-- Looking for sgesv
-- Looking for sgesv - found
-- Looking for sgesv_
-- Looking for sgesv_ - found
-- Found CUDA: /usr/local/cuda-10.1 (found suitable version "10.1", minimum required is "7.5")
-- Looking for cuDNN install...
-- Found cuDNN: /usr/local/cuda/lib64/libcudnn.so
-- Building a CUDA test project to see if your compiler is compatible with CUDA...
-- Building a cuDNN test project to check if you have the right version of cuDNN installed...
-- Enabling CUDA support for dlib. DLIB WILL USE CUDA
-- C++11 activated.
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/build/temp.linux-x86_64-3.6
Invoking CMake build: 'cmake --build . --config Release -- -j32'
[ 1%] Building NVCC (Device) object dlib_build/CMakeFiles/dlib.dir/cuda/dlib_generated_cusolver_dlibapi.cu.o
[ 2%] Building NVCC (Device) object dlib_build/CMakeFiles/dlib.dir/cuda/dlib_generated_cuda_dlib.cu.o
/home/ubuntu/anaconda3/envs/pytorch_p36/x86_64-conda_cos6-linux-gnu/include/c++/7.3.0/type_traits(177): error: "conjunction_v" is not a function or static data member
----------------------------------------
ERROR: Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
Installing collected packages: dlib
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-5n01zfw0/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/anaconda3/envs/pytorch_p36/include/python3.6m/dlib
cwd: /tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/
Complete output (539 lines):
running install
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.6.10 |Anaconda, Inc.| (default, Jan 7 2020, 21:14:29)
Invoking CMake setup: 'cmake /tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/build/lib.linux-x86_64-3.6 -DPYTHON_EXECUTABLE=/home/ubuntu/anaconda3/envs/pytorch_p36/bin/python -DCMAKE_BUILD_TYPE=Release'
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/x86_64-conda_cos6-linux-gnu-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: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/x86_64-conda_cos6-linux-gnu-c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/python (found version "3.6.10")
-- Found PythonLibs: /home/ubuntu/anaconda3/envs/pytorch_p36/lib/libpython3.6m.so
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.2.4
-- Using CMake version: 3.18.4
-- Compiling dlib version: 19.21.1
-- SSE4 instructions can be executed by the host processor.
-- AVX instructions can be executed by the host processor.
-- Enabling AVX instructions
-- Looking for pthread.h
-- Looking for pthread.h - found
-- 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
-- Could NOT find X11 (missing: X11_X11_LIB)
*****************************************************************************
*** DLIB GUI SUPPORT DISABLED BECAUSE X11 DEVELOPMENT LIBRARIES NOT FOUND ***
*** Make sure libx11-dev is installed if you want GUI support. ***
*** On Ubuntu run: sudo apt-get install libx11-dev ***
*****************************************************************************
Error limit reached.
100 errors detected in the compilation of "/tmp/tmpxft_00017e17_00000000-6_cusolver_dlibapi.cpp1.ii".
Compilation terminated.
CMake Error at dlib_generated_cusolver_dlibapi.cu.o.Release.cmake:280 (message):
Error generating file
/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/build/temp.linux-x86_64-3.6/dlib_build/CMakeFiles/dlib.dir/cuda/./dlib_generated_cusolver_dlibapi.cu.o
dlib_build/CMakeFiles/dlib.dir/build.make:89: recipe for target 'dlib_build/CMakeFiles/dlib.dir/cuda/dlib_generated_cusolver_dlibapi.cu.o' failed
make[2]: *** [dlib_build/CMakeFiles/dlib.dir/cuda/dlib_generated_cusolver_dlibapi.cu.o] Error 1
CMakeFiles/Makefile2:162: recipe for target 'dlib_build/CMakeFiles/dlib.dir/all' failed
make[1]: *** [dlib_build/CMakeFiles/dlib.dir/all] Error 2
Makefile:102: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py", line 262, in <module>
'Topic :: Software Development',
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/setuptools/__init__.py", line 144, in setup
return distutils.core.setup(**attrs)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/core.py", line 148, in setup
dist.run_commands()
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/site-packages/setuptools/command/install.py", line 61, in run
return orig.install.run(self)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/command/install.py", line 545, in run
self.run_command('build')
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/command/build.py", line 135, in run
self.run_command(cmd_name)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py", line 135, in run
self.build_extension(ext)
File "/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py", line 175, in build_extension
subprocess.check_call(cmake_build, cwd=build_folder)
File "/home/ubuntu/anaconda3/envs/pytorch_p36/lib/python3.6/subprocess.py", line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '-j32']' returned non-zero exit status 2.
----------------------------------------
ERROR: Command errored out with exit status 1: /home/ubuntu/anaconda3/envs/pytorch_p36/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-5n01zfw0/install-record.txt --single-version-externally-managed --compile --install-headers /home/ubuntu/anaconda3/envs/pytorch_p36/include/python3.6m/dlib Check the logs for full command output.
WARNING: You are using pip version 20.3.3; however, version 21.0.1 is available.
You should consider upgrading via the '/home/ubuntu/anaconda3/envs/pytorch_p36/bin/python -m pip install --upgrade pip' command.
收集dlib
使用缓存的dlib-19.21.1.tar.gz(3.6 MB)
为收集的包构建控制盘:dlib
正在为dlib构建控制盘(setup.py)。。。错误
错误:命令出错,退出状态为1:
命令:/home/ubuntu/anaconda3/envs/pytorch_p36/bin/python-u-c'import sys、setuptools、tokenize;sys.argv[0]=“””/tmp/pip-install-1nd52hmz/dlib_d4fe1d220054b38a6c0e81d4dd21a8a/setup.py“”__文件“''”/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/setup.py''”;f=getattr(标记化,“'open'”,open)(\uuuuu文件);code=f.read().replace(“\r\n”“”、“\n”“”);f、 close();exec(编译(代码,“文件”“exec”))“bdist\uwheel-d/tmp/pip-wheel-dj”f226q
cwd:/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/
完整输出(537行):
运转的车轮
运行构建
运行build\u py
找不到包初始化文件“tools/python/dlib/_init__uuu.py”(或不是常规文件)
运行build_ext
Python 3.6.10 | Anaconda,Inc.|的构建扩展(默认,2020年1月7日,21:14:29)
调用CMake安装程序:“CMake/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/tools/python-DCMAKE_LIBRARY\u OUTPUT_DIRECTORY=/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/build/lib.linux-x86_64-3.6-DPYTHON_=/home/ubuntu/anaconda3/envs/pythor\u可执行文件/p36/bin/DCMAKE=python版本”
--C编译器标识为GNU7.3.0
--CXX编译器标识为GNU 7.3.0
--检测C编译器ABI信息
--检测C编译器ABI信息-完成
--检查C编译器是否工作:/home/ubuntu/anaconda3/envs/pytorch_p36/bin/x86_64-conda_cos6-linux-gnu-cc-跳过
--检测C编译特性
--检测C编译特性-完成
--检测CXX编译器ABI信息
--检测CXX编译器ABI信息-完成
--检查CXX编译器是否工作:/home/ubuntu/anaconda3/envs/pytorch_p36/bin/x86_64-conda_cos6-linux-gnu-c++-跳过
--检测CXX编译特性
--检测CXX编译功能-完成
--找到PythonInterp:/home/ubuntu/anaconda3/envs/pytorch_p36/bin/python(找到版本“3.6.10”)
--找到PythonLibs:/home/ubuntu/anaconda3/envs/pytorch_p36/lib/libpython3.6m.so
--正在执行的测试具有\u CPP14\u标志
--执行测试有\u CPP14 \u标志-成功
--pybind11 v2.2.4
--使用CMake版本:3.18.4
--编译dlib版本:19.21.1
--SSE4指令可由主机处理器执行。
--AVX指令可以由主机处理器执行。
--启用AVX指令
--正在查找pthread.h
--正在查找pthread.h-找到
--正在执行测试CMAKE_HAVE_LIBC_PTHREAD
--执行测试CMAKE_HAVE_LIBC_PTHREAD-失败
--在pthreads中查找pthread_create
--在pthreads中查找pthread_create-未找到
--在pthread中查找pthread_create
--在pthread中查找pthread_create-找到
--找到的线程:TRUE
--找不到X11(缺少:X11_X11_LIB)
*****************************************************************************
***DLIB GUI支持已禁用,因为找不到X11开发库***
***如果需要GUI支持,请确保已安装libx11 dev***
***在Ubuntu上运行:sudo apt get install libx11 dev***
*****************************************************************************
--找到libpng的系统副本:/home/ubuntu/anaconda3/envs/pytorch_p36/lib/libpng.so/home/ubuntu/anaconda3/envs/pytorch_p36/lib/libz.so
--找到libjpeg的系统副本:/home/ubuntu/anaconda3/envs/pytorch_p36/lib/libjpeg.so
--寻找布拉斯和拉帕克
--寻找布拉斯和拉帕克
--找到pkg配置:/usr/bin/pkg配置(找到版本“0.29.1”)
--正在检查模块“cblas”
--找不到包“cblas”
--正在检查模块“lapack”
--找到lapack,版本3.10.3
--寻找cblas_ddot
--正在查找cblas_ddot-未找到
--正在查找sys/types.h
--正在查找sys/types.h-找到
--正在寻找stdint.h
--正在查找stdint.h-找到
--寻找stddef.h
--正在查找stddef.h-找到
--检查空隙的大小*
--检查空隙的大小*-完成
--找到“英特尔MKL BLAS/LAPACK库”
--寻找sgesv
--正在查找sgesv-已找到
--寻找sgesv_
--正在查找sgesv_u2;-找到
--找到CUDA:/usr/local/CUDA-10.1(找到合适的版本“10.1”,最低要求为“7.5”)
--正在查找cuDNN安装。。。
--找到cuDNN:/usr/local/cuda/lib64/libcudnn.so
--正在构建CUDA测试项目,以查看编译器是否与CUDA兼容。。。
--正在构建cuDNN测试项目,以检查是否安装了正确版本的cuDNN。。。
--为dlib启用CUDA支持。DLIB将使用CUDA
--C++11已激活。
--配置完成
--生成完成
--生成文件已写入:/tmp/pip-install-1nd52hmz/dlib_d4fe1d2320054b38a6c0e81d4dd21a8a/Build/temp.linux-x86_64-3.6
调用CMake build:'CMake--build--配置发布--j32'
[1%]构建NVCC(设备)对象dlib_build/cmakfiles/dlib.dir/cuda/dlib_generated\u cusolver_dlibapi.cu.o
[2%]构建NVCC(设备)对象dlib_build/cmakfiles/dlib.dir/cuda/dlib_生成的dlib_cuda_dlib.cu.o
/home/ubuntu/anaconda3/envs/pytorch_p36/x86_64-conda_cos6-linux-gnu/include/c++/7.3.0/type_traits(177):错误:“conjunction_v”不是函数或静态数据成员
----------------------------------------
错误: