작성
·
402
0
안녕하세요.
dlib 설치과정에서 오류가 발생하여 질문 드립니다(이전에 올라온 오류내용과는 다른 것 같아서요).
저 같은 경우에는 Visual Studio for C++가 설치되지 않았다고 메세지가 뜨고 있구요. 확인해보니 Visual Studio 2017이 설치되어 있습니다(Ver. 15.9.33). C++용은 별도로 있는 건가요?
그리고 sudo 명령을 써서 설치 해보려고도 했는데 저는 Sudo를 치면 이렇게 에러가 뜨네요;;
'sudo'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는 배치 파일이 아닙니다.
Error Message
--------------------
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: 'c:\users\dback\anaconda3\envs\computervision\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\dback\\AppData\\Local\\Temp\\pip-install-sve59yx7\\dlib_0c949618dbc44980a36e6e19378d8423\\setup.py'"'"'; __file__='"'"'C:\\Users\\dback\\AppData\\Local\\Temp\\pip-install-sve59yx7\\dlib_0c949618dbc44980a36e6e19378d8423\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\dback\AppData\Local\Temp\pip-record-ksd_hvtu\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\dback\anaconda3\envs\computervision\Include\dlib'
cwd: C:\Users\dback\AppData\Local\Temp\pip-install-sve59yx7\dlib_0c949618dbc44980a36e6e19378d8423\
Complete output (60 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.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\dback\AppData\Local\Temp\pip-install-sve59yx7\dlib_0c949618dbc44980a36e6e19378d8423\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\dback\AppData\Local\Temp\pip-install-sve59yx7\dlib_0c949618dbc44980a36e6e19378d8423\build\lib.win-amd64-3.8 -DPYTHON_EXECUTABLE=c:\users\dback\anaconda3\envs\computervision\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\dback\AppData\Local\Temp\pip-install-sve59yx7\dlib_0c949618dbc44980a36e6e19378d8423\build\lib.win-amd64-3.8 -A x64'
-- Building for: NMake Makefiles
CMake Error at CMakeLists.txt:5 (message):
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
You must use Visual Studio to build a python extension on windows. If you
are getting this error it means you have not installed Visual C++. Note
that there are many flavors of Visual Studio, like Visual Studio for C#
development. You need to install Visual Studio for C++.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\dback\AppData\Local\Temp\pip-install-sve59yx7\dlib_0c949618dbc44980a36e6e19378d8423\setup.py", line 223, in <module>
setup(
File "c:\users\dback\anaconda3\envs\computervision\lib\site-packages\setuptools\__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "c:\users\dback\anaconda3\envs\computervision\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\dback\anaconda3\envs\computervision\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\dback\anaconda3\envs\computervision\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\dback\anaconda3\envs\computervision\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\users\dback\anaconda3\envs\computervision\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\dback\anaconda3\envs\computervision\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\dback\anaconda3\envs\computervision\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\dback\anaconda3\envs\computervision\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\dback\anaconda3\envs\computervision\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\dback\anaconda3\envs\computervision\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\dback\AppData\Local\Temp\pip-install-sve59yx7\dlib_0c949618dbc44980a36e6e19378d8423\setup.py", line 135, in run
self.build_extension(ext)
File "C:\Users\dback\AppData\Local\Temp\pip-install-sve59yx7\dlib_0c949618dbc44980a36e6e19378d8423\setup.py", line 172, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "c:\users\dback\anaconda3\envs\computervision\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\dback\\AppData\\Local\\Temp\\pip-install-sve59yx7\\dlib_0c949618dbc44980a36e6e19378d8423\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\dback\\AppData\\Local\\Temp\\pip-install-sve59yx7\\dlib_0c949618dbc44980a36e6e19378d8423\\build\\lib.win-amd64-3.8', '-DPYTHON_EXECUTABLE=c:\\users\\dback\\anaconda3\\envs\\computervision\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\dback\\AppData\\Local\\Temp\\pip-install-sve59yx7\\dlib_0c949618dbc44980a36e6e19378d8423\\build\\lib.win-amd64-3.8', '-A', 'x64']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\dback\anaconda3\envs\computervision\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\dback\\AppData\\Local\\Temp\\pip-install-sve59yx7\\dlib_0c949618dbc44980a36e6e19378d8423\\setup.py'"'"'; __file__='"'"'C:\\Users\\dback\\AppData\\Local\\Temp\\pip-install-sve59yx7\\dlib_0c949618dbc44980a36e6e19378d8423\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\dback\AppData\Local\Temp\pip-record-ksd_hvtu\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\dback\anaconda3\envs\computervision\Include\dlib' Check the logs for full command output.
(ComputerVision) C:\Users\dback>
답변 1
0
안녕하세요?
윈도우에서는 sudo명령을 사용하지 않으셔야 합니다.
Dlib이 설치가 까다로운 라이브러리인데 이전의 질문이나 구글링으로 해결책을 참조하시기 바랍니다.
감사합니다.