how to install dlib in python 32 bit? This error is coming

早过忘川 提交于 2019-12-12 06:46:10

问题


C:\Users\leatherwallZ>pip install dlib Collecting dlib Using cached https://files.pythonhosted.org/packages/1e/62/aacb236d21fbd08148b1d517d58a9d80ea31bdcd386d26f21f8b23b1eb28/dlib-19.18.0.tar.gz Installing collected packages: dlib Running setup.py install for dlib ... error ERROR: Command errored out with exit status 1: command: 'c:\users\leatherwallz\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\LEATHE~1\AppData\Local\Temp\pip-install-x1z5rp1d\dlib\setup.py'"'"'; file='"'"'C:\Users\LEATHE~1\AppData\Local\Temp\pip-install-x1z5rp1d\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\LEATHE~1\AppData\Local\Temp\pip-record-me60_p81\install-record.txt' --single-version-externally-managed --compile cwd: C:\Users\LEATHE~1\AppData\Local\Temp\pip-install-x1z5rp1d\dlib\ Complete output (66 lines): running install running build running build_py package init file 'dlib__init__.py' not found (or not a regular file) running build_ext Building extension for Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 21:26:53) [MSC v.1916 32 bit (Intel)] Invoking CMake setup: 'cmake C:\Users\LEATHE~1\AppData\Local\Temp\pip-install-x1z5rp1d\dlib\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\LEATHE~1\AppData\Local\Temp\pip-install-x1z5rp1d\dlib\build\lib.win32-3.7 -DPYTHON_EXECUTABLE=c:\users\leatherwallz\appdata\local\programs\python\python37-32\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\LEATHE~1\AppData\Local\Temp\pip-install-x1z5rp1d\dlib\build\lib.win32-3.7' -- Building for: Visual Studio 16 2019 -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.17134. -- The C compiler identification is MSVC 19.23.28107.0 -- The CXX compiler identification is MSVC 19.23.28107.0 -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe -- 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: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PythonInterp: C:/Users/leatherwallZ/AppData/Local/Programs/Python/Python37-32/python.exe (found version "3.7.3") CMake Error at C:/Users/leatherwallZ/AppData/Local/Temp/pip-install-x1z5rp1d/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/leatherwallZ/AppData/Local/Temp/pip-install-x1z5rp1d/dlib/dlib/external/pybind11/tools/pybind11Tools.cmake:16 (find_package) C:/Users/leatherwallZ/AppData/Local/Temp/pip-install-x1z5rp1d/dlib/dlib/external/pybind11/CMakeLists.txt:33 (include)

-- Configuring incomplete, errors occurred!
See also "C:/Users/leatherwallZ/AppData/Local/Temp/pip-install-x1z5rp1d/dlib/build/temp.win32-3.7/Release/CMakeFiles/CMakeOutput.log".
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\LEATHE~1\AppData\Local\Temp\pip-install-x1z5rp1d\dlib\setup.py", line 261, in <module>
    'Topic :: Software Development',
  File "c:\users\leatherwallz\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
    return distutils.core.setup(**attrs)
  File "c:\users\leatherwallz\appdata\local\programs\python\python37-32\lib\distutils\core.py", line 148, in setup
    dist.run_commands()
  File "c:\users\leatherwallz\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 966, in run_commands
    self.run_command(cmd)
  File "c:\users\leatherwallz\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "c:\users\leatherwallz\appdata\local\programs\python\python37-32\lib\site-packages\setuptools\command\install.py", line 61, in run
    return orig.install.run(self)
  File "c:\users\leatherwallz\appdata\local\programs\python\python37-32\lib\distutils\command\install.py", line 545, in run
    self.run_command('build')
  File "c:\users\leatherwallz\appdata\local\programs\python\python37-32\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\users\leatherwallz\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "c:\users\leatherwallz\appdata\local\programs\python\python37-32\lib\distutils\command\build.py", line 135, in run
    self.run_command(cmd_name)
  File "c:\users\leatherwallz\appdata\local\programs\python\python37-32\lib\distutils\cmd.py", line 313, in run_command
    self.distribution.run_command(command)
  File "c:\users\leatherwallz\appdata\local\programs\python\python37-32\lib\distutils\dist.py", line 985, in run_command
    cmd_obj.run()
  File "C:\Users\LEATHE~1\AppData\Local\Temp\pip-install-x1z5rp1d\dlib\setup.py", line 135, in run
    self.build_extension(ext)
  File "C:\Users\LEATHE~1\AppData\Local\Temp\pip-install-x1z5rp1d\dlib\setup.py", line 172, in build_extension
    subprocess.check_call(cmake_setup, cwd=build_folder)
  File "c:\users\leatherwallz\appdata\local\programs\python\python37-32\lib\subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\LEATHE~1\\AppData\\Local\\Temp\\pip-install-x1z5rp1d\\dlib\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\LEATHE~1\\AppData\\Local\\Temp\\pip-install-x1z5rp1d\\dlib\\build\\lib.win32-3.7', '-DPYTHON_EXECUTABLE=c:\\users\\leatherwallz\\appdata\\local\\programs\\python\\python37-32\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\LEATHE~1\\AppData\\Local\\Temp\\pip-install-x1z5rp1d\\dlib\\build\\lib.win32-3.7']' returned non-zero exit status 1.
----------------------------------------

ERROR: Command errored out with exit status 1: 'c:\users\leatherwallz\appdata\local\programs\python\python37-32\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\LEATHE~1\AppData\Local\Temp\pip-install-x1z5rp1d\dlib\setup.py'"'"'; file='"'"'C:\Users\LEATHE~1\AppData\Local\Temp\pip-install-x1z5rp1d\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\LEATHE~1\AppData\Local\Temp\pip-record-me60_p81\install-record.txt' --single-version-externally-managed --compile Check the logs for full command output.

来源:https://stackoverflow.com/questions/58878137/how-to-install-dlib-in-python-32-bit-this-error-is-coming

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!