前提・実現したいこと
pythonにdlibを入れようとしています。しかし、下記のようなエラーメッセージが出てきてしまいます。
どなたか助けてください。よろしくお願いいたします
発生している問題・エラーメッセージ
pip install dlib
Collecting dlib
Using cached dlib-19.21.0.tar.gz (3.2 MB)
Using legacy 'setup.py install' for dlib, since package 'wheel' is not installed.
Installing collected packages: dlib
Running setup.py install for dlib ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\hasemi\appdata\local\programs\python\python36-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\hasemi\AppData\Local\Temp\pip-install-e9gz91zf\dlib\setup.py'"'"'; file='"'"'C:\Users\hasemi\AppData\Local\Temp\pip-install-e9gz91zf\dlib\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\hasemi\AppData\Local\Temp\pip-record-m5w8517h\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\hasemi\appdata\local\programs\python\python36-32\Include\dlib'
cwd: C:\Users\hasemi\AppData\Local\Temp\pip-install-e9gz91zf\dlib
Complete output (64 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.8 (tags/v3.6.8:3c6b436a57, Dec 23 2018, 23:31:17) [MSC v.1916 32 bit (Intel)]
Invoking CMake setup: 'cmake C:\Users\hasemi\AppData\Local\Temp\pip-install-e9gz91zf\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\hasemi\AppData\Local\Temp\pip-install-e9gz91zf\dlib\build\lib.win32-3.6 -DPYTHON_EXECUTABLE=c:\users\hasemi\appdata\local\programs\python\python36-32\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\hasemi\AppData\Local\Temp\pip-install-e9gz91zf\dlib\build\lib.win32-3.6'
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
-- The C compiler identification is MSVC 19.27.29110.0
-- The CXX compiler identification is MSVC 19.27.29110.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: C:/Users/hasemi/AppData/Local/Programs/Python/Python36-32/python.exe (found version "3.6.8")
CMake Error at C:/Users/hasemi/AppData/Local/Temp/pip-install-e9gz91zf/dlib/dlib/external/pybind11/tools/FindPythonLibsNew.cmake:124 (message):
Python config failure: Python is 32-bit, chosen compiler is 64-bit
Call Stack (most recent call first):
C:/Users/hasemi/AppData/Local/Temp/pip-install-e9gz91zf/dlib/dlib/external/pybind11/tools/pybind11Tools.cmake:16 (find_package)
C:/Users/hasemi/AppData/Local/Temp/pip-install-e9gz91zf/dlib/dlib/external/pybind11/CMakeLists.txt:33 (include)
-- Configuring incomplete, errors occurred! See also "C:/Users/hasemi/AppData/Local/Temp/pip-install-e9gz91zf/dlib/build/temp.win32-3.6/Release/CMakeFiles/CMakeOutput.log". Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Users\hasemi\AppData\Local\Temp\pip-install-e9gz91zf\dlib\setup.py", line 262, in <module> 'Topic :: Software Development', File "c:\users\hasemi\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\__init__.py", line 143, in setup return distutils.core.setup(**attrs) File "c:\users\hasemi\appdata\local\programs\python\python36-32\lib\distutils\core.py", line 148, in setup dist.run_commands() File "c:\users\hasemi\appdata\local\programs\python\python36-32\lib\distutils\dist.py", line 955, in run_commands self.run_command(cmd) File "c:\users\hasemi\appdata\local\programs\python\python36-32\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "c:\users\hasemi\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\command\install.py", line 61, in run return orig.install.run(self) File "c:\users\hasemi\appdata\local\programs\python\python36-32\lib\distutils\command\install.py", line 545, in run self.run_command('build') File "c:\users\hasemi\appdata\local\programs\python\python36-32\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command) File "c:\users\hasemi\appdata\local\programs\python\python36-32\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "c:\users\hasemi\appdata\local\programs\python\python36-32\lib\distutils\command\build.py", line 135, in run self.run_command(cmd_name) File "c:\users\hasemi\appdata\local\programs\python\python36-32\lib\distutils\cmd.py", line 313, in run_command self.distribution.run_command(command)````````` File "c:\users\hasemi\appdata\local\programs\python\python36-32\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "C:\Users\hasemi\AppData\Local\Temp\pip-install-e9gz91zf\dlib\setup.py", line 135, in run self.build_extension(ext) File "C:\Users\hasemi\AppData\Local\Temp\pip-install-e9gz91zf\dlib\setup.py", line 172, in build_extension subprocess.check_call(cmake_setup, cwd=build_folder) File "c:\users\hasemi\appdata\local\programs\python\python36-32\lib\subprocess.py", line 311, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', 'C:\Users\hasemi\AppData\Local\Temp\pip-install-e9gz91zf\dlib\tools\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\hasemi\AppData\Local\Temp\pip-install-e9gz91zf\dlib\build\lib.win32-3.6', '-DPYTHON_EXECUTABLE=c:\users\hasemi\appdata\local\programs\python\python36-32\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\hasemi\AppData\Local\Temp\pip-install-e9gz91zf\dlib\build\lib.win32-3.6']' returned non-zero exit status 1. ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\hasemi\appdata\local\programs\python\python36-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\hasemi\AppData\Local\Temp\pip-install-e9gz91zf\dlib\setup.py'"'"'; file='"'"'C:\Users\hasemi\AppData\Local\Temp\pip-install-e9gz91zf\dlib\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\hasemi\AppData\Local\Temp\pip-record-m5w8517h\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\hasemi\appdata\local\programs\python\python36-32\Include\dlib' Check the logs for full command output.
試したこと
様々なサイトに書いてあるdlibのインストール方法は試したかなと思います。
補足情報(FW/ツールのバージョンなど)
pythonのバージョン
3.6.8
インストール済みのパッケージ
cmake 3.18.0
cycler 0.10.0
kiwisolver 1.2.0
matplotlib 3.3.0
numpy 1.19.1
opencv-python 4.3.0.36
Pillow 7.2.0
pip 20.2.2
pyparsing 2.4.7
python-dateutil 2.8.1
setuptools 40.6.2
six 1.15.0
update 0.0.1
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2020/08/14 01:56
2020/08/14 02:15
2020/08/14 06:24
2020/08/14 07:07
2020/08/14 08:10
2020/08/14 08:16
2020/08/17 00:30
2020/08/21 03:07