Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install in python has got some error (m1 mbp) #2439

Closed
insung3511 opened this issue Oct 5, 2021 · 8 comments
Closed

install in python has got some error (m1 mbp) #2439

insung3511 opened this issue Oct 5, 2021 · 8 comments
Labels

Comments

@insung3511
Copy link

Expected Behavior

Hi, I was installing dlib on python 3.9.5 with pip but I got some errors. I just typed

pip install dlib

but got errors like below one. plz tell me why this happen and how to solve this problem. thanks.

Current Behavior

Collecting dlib
  Downloading dlib-19.22.1.tar.gz (7.4 MB)
     |████████████████████████████████| 7.4 MB 7.8 MB/s
Building wheels for collected packages: dlib
  Building wheel for dlib (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/bahk_insung/miniforge3/envs/pycv/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/setup.py'"'"'; __file__='"'"'/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-wheel-vhwhz22x
       cwd: /private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/
  Complete output (74 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.9.5 | packaged by conda-forge | (default, Jun 19 2021, 00:24:55)
  Invoking CMake setup: 'cmake /private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/build/lib.macosx-11.0-arm64-3.9 -DPYTHON_EXECUTABLE=/Users/bahk_insung/miniforge3/envs/pycv/bin/python3.9 -DCMAKE_BUILD_TYPE=Release'
  -- The C compiler identification is AppleClang 13.0.0.13000029
  -- The CXX compiler identification is AppleClang 13.0.0.13000029
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - failed
  -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
  -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - broken
  CMake Error at /opt/homebrew/Cellar/cmake/3.21.3/share/cmake/Modules/CMakeTestCCompiler.cmake:69 (message):
    The C compiler

      "/Library/Developer/CommandLineTools/usr/bin/cc"

    is not able to compile a simple test program.

    It fails with the following output:

      Change Dir: /private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/build/temp.macosx-11.0-arm64-3.9/CMakeFiles/CMakeTmp

      Run Build Command(s):/usr/bin/make -f Makefile cmTC_7c218/fast && /Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/cmTC_7c218.dir/build.make CMakeFiles/cmTC_7c218.dir/build
      Building C object CMakeFiles/cmTC_7c218.dir/testCCompiler.c.o
      /Library/Developer/CommandLineTools/usr/bin/cc   -falign-functions=8 -falign-functions=8  CFLAGS  -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -MD -MT CMakeFiles/cmTC_7c218.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_7c218.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_7c218.dir/testCCompiler.c.o -c /private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/build/temp.macosx-11.0-arm64-3.9/CMakeFiles/CMakeTmp/testCCompiler.c
      clang: error: no such file or directory: 'CFLAGS'
      make[1]: *** [CMakeFiles/cmTC_7c218.dir/testCCompiler.c.o] Error 1
      make: *** [cmTC_7c218/fast] Error 2





    CMake will not be able to correctly generate this project.
  Call Stack (most recent call first):
    CMakeLists.txt:14 (project)


  -- Configuring incomplete, errors occurred!
  See also "/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/build/temp.macosx-11.0-arm64-3.9/CMakeFiles/CMakeOutput.log".
  See also "/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/build/temp.macosx-11.0-arm64-3.9/CMakeFiles/CMakeError.log".
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/setup.py", line 222, in <module>
      setup(
    File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/setup.py", line 134, in run
      self.build_extension(ext)
    File "/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/setup.py", line 171, in build_extension
      subprocess.check_call(cmake_setup, cwd=build_folder)
    File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/subprocess.py", line 373, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/build/lib.macosx-11.0-arm64-3.9', '-DPYTHON_EXECUTABLE=/Users/bahk_insung/miniforge3/envs/pycv/bin/python3.9', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
  ----------------------------------------
  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: /Users/bahk_insung/miniforge3/envs/pycv/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/setup.py'"'"'; __file__='"'"'/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-record-n_sno30n/install-record.txt --single-version-externally-managed --compile --install-headers /Users/bahk_insung/miniforge3/envs/pycv/include/python3.9/dlib
         cwd: /private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/
    Complete output (76 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.9.5 | packaged by conda-forge | (default, Jun 19 2021, 00:24:55)
    Invoking CMake setup: 'cmake /private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/build/lib.macosx-11.0-arm64-3.9 -DPYTHON_EXECUTABLE=/Users/bahk_insung/miniforge3/envs/pycv/bin/python3.9 -DCMAKE_BUILD_TYPE=Release'
    -- The C compiler identification is AppleClang 13.0.0.13000029
    -- The CXX compiler identification is AppleClang 13.0.0.13000029
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - failed
    -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
    -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - broken
    CMake Error at /opt/homebrew/Cellar/cmake/3.21.3/share/cmake/Modules/CMakeTestCCompiler.cmake:69 (message):
      The C compiler

        "/Library/Developer/CommandLineTools/usr/bin/cc"

      is not able to compile a simple test program.

      It fails with the following output:

        Change Dir: /private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/build/temp.macosx-11.0-arm64-3.9/CMakeFiles/CMakeTmp

        Run Build Command(s):/usr/bin/make -f Makefile cmTC_0d525/fast && /Library/Developer/CommandLineTools/usr/bin/make  -f CMakeFiles/cmTC_0d525.dir/build.make CMakeFiles/cmTC_0d525.dir/build
        Building C object CMakeFiles/cmTC_0d525.dir/testCCompiler.c.o
        /Library/Developer/CommandLineTools/usr/bin/cc   -falign-functions=8 -falign-functions=8  CFLAGS  -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -MD -MT CMakeFiles/cmTC_0d525.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_0d525.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_0d525.dir/testCCompiler.c.o -c /private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/build/temp.macosx-11.0-arm64-3.9/CMakeFiles/CMakeTmp/testCCompiler.c
        clang: error: no such file or directory: 'CFLAGS'
        make[1]: *** [CMakeFiles/cmTC_0d525.dir/testCCompiler.c.o] Error 1
        make: *** [cmTC_0d525/fast] Error 2





      CMake will not be able to correctly generate this project.
    Call Stack (most recent call first):
      CMakeLists.txt:14 (project)


    -- Configuring incomplete, errors occurred!
    See also "/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/build/temp.macosx-11.0-arm64-3.9/CMakeFiles/CMakeOutput.log".
    See also "/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/build/temp.macosx-11.0-arm64-3.9/CMakeFiles/CMakeError.log".
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/setup.py", line 222, in <module>
        setup(
      File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/distutils/command/install.py", line 546, in run
        self.run_command('build')
      File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/setup.py", line 134, in run
        self.build_extension(ext)
      File "/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/setup.py", line 171, in build_extension
        subprocess.check_call(cmake_setup, cwd=build_folder)
      File "/Users/bahk_insung/miniforge3/envs/pycv/lib/python3.9/subprocess.py", line 373, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', '/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/tools/python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/build/lib.macosx-11.0-arm64-3.9', '-DPYTHON_EXECUTABLE=/Users/bahk_insung/miniforge3/envs/pycv/bin/python3.9', '-DCMAKE_BUILD_TYPE=Release']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/bahk_insung/miniforge3/envs/pycv/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/setup.py'"'"'; __file__='"'"'/private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-install-llvjacr6/dlib_8e79c2196717444e9f4e68dabf193ded/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/01/5f5ftlvn2w7c9prxbs4410780000gn/T/pip-record-n_sno30n/install-record.txt --single-version-externally-managed --compile --install-headers /Users/bahk_insung/miniforge3/envs/pycv/include/python3.9/dlib Check the logs for full command output.

Steps to Reproduce

Nothing. just I typed pip install dlib thats it.

  • Version: python==3.9.5 / pip==21.2.4
  • Where did you get dlib: by pip command
  • Platform: M1 arm64
  • Compiler: I don't have it. but I'm using clang==13.0.0
@MarcioJrios
Copy link

MarcioJrios commented Oct 7, 2021

I'm having a similar issue trying to install dlib on windows

`
D:\dlib-master\setup.py:39: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils import log
running install
running bdist_egg
running egg_info
writing tools/python\dlib.egg-info\PKG-INFO
writing dependency_links to tools/python\dlib.egg-info\dependency_links.txt
writing top-level names to tools/python\dlib.egg-info\top_level.txt
package init file 'tools\python\dlib_init_.py' not found (or not a regular file)
reading manifest file 'tools/python\dlib.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'tools\python\build*'
no previously-included directories found matching 'dlib\cmake_utils*\build*'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
adding license file 'LICENSE.txt'
writing manifest file 'tools/python\dlib.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
Building extension for Python 3.10.0 (tags/v3.10.0:b494f59, Oct 4 2021, 19:00:18) [MSC v.1929 64 bit (AMD64)]
Invoking CMake setup: 'cmake D:\dlib-master\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\dlib-master\build\lib.win-amd64-3.10 -DPYTHON_EXECUTABLE=D:\Python\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=D:\dlib-master\build\lib.win-amd64-3.10 -A x64'
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19043.
-- pybind11 v2.2.4
-- Using CMake version: 3.21.3
-- Compiling dlib version: 19.22.99
-- SSE4 instructions can be executed by the host processor.
-- AVX instructions can be executed by the host processor.
-- Enabling AVX instructions
-- C++11 activated.
-- Configuring done
-- Generating done
-- Build files have been written to: D:/dlib-master/build/temp.win-amd64-3.10/Release
Invoking CMake build: 'cmake --build . --config Release -- /m'
Microsoft(R) Build Engine versão 16.11.1+3e40a09f8 para .NET Framework
Copyright (C) Microsoft Corporation. Todos os direitos reservados.

dlib.vcxproj -> D:\dlib-master\build\temp.win-amd64-3.10\Release\dlib_build\Release\dlib19.22.99_release_64bit_msvc19
29.lib
dlib.cpp
matrix.cpp
vector.cpp
svm_c_trainer.cpp
svm_rank_trainer.cpp
decision_functions.cpp
other.cpp
basic.cpp
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\dlib.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\R
elease_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\dlib.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Release_dlib_pyb
ind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\vector.cpp) [D:\dlib-master\build\temp.win-amd64-3.10
\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\vector.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Release_dlib_p
ybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\svm_c_trainer.cpp) [D:\dlib-master\build\temp.win-amd
64-3.10\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\svm_c_trainer.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Release
_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\matrix.cpp) [D:\dlib-master\build\temp.win-amd64-3.10
\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\matrix.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Release_dlib_p
ybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\svm_rank_trainer.cpp) [D:\dlib-master\build\temp.win-
amd64-3.10\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\svm_rank_trainer.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Relea
se_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\other.cpp) [D:\dlib-master\build\temp.win-amd64-3.10
Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\other.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Release_dlib_py
bind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\decision_functions.cpp) [D:\dlib-master\build\temp.wi
n-amd64-3.10\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\decision_functions.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Rel
ease_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\basic.cpp) [D:\dlib-master\build\temp.win-amd64-3.10
Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\basic.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Release_dlib_py
bind11.vcxproj]
cca.cpp
sequence_segmenter.cpp
svm_struct.cpp
image.cpp
image2.cpp
image3.cpp
image4.cpp
rectangles.cpp
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\cca.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Re
lease_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\cca.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Release_dlib_pybi
nd11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\sequence_segmenter.cpp) [D:\dlib-master\build\temp.wi
n-amd64-3.10\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\sequence_segmenter.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Rel
ease_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\svm_struct.cpp) [D:\dlib-master\build\temp.win-amd64-
3.10\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\svm_struct.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Release_dl
ib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\image.cpp) [D:\dlib-master\build\temp.win-amd64-3.10
Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\image.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Release_dlib_py
bind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\image3.cpp) [D:\dlib-master\build\temp.win-amd64-3.10
\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\image3.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Release_dlib_p
ybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\image2.cpp) [D:\dlib-master\build\temp.win-amd64-3.10
\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\image2.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Release_dlib_p
ybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\image4.cpp) [D:\dlib-master\build\temp.win-amd64-3.10
\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\image4.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Release_dlib_p
ybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\rectangles.cpp) [D:\dlib-master\build\temp.win-amd64-
3.10\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\rectangles.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Release_dl
ib_pybind11.vcxproj]
object_detection.cpp
shape_predictor.cpp
correlation_tracker.cpp
face_recognition.cpp
cnn_face_detector.cpp
global_optimization.cpp
image_dataset_metadata.cpp
numpy_returns.cpp
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\object_detection.cpp) [D:\dlib-master\build\temp.win-
amd64-3.10\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\object_detection.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Relea
se_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\shape_predictor.cpp) [D:\dlib-master\build\temp.win-a
md64-3.10\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\shape_predictor.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Releas
e_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\face_recognition.cpp) [D:\dlib-master\build\temp.win-
amd64-3.10\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\face_recognition.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Relea
se_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\correlation_tracker.cpp) [D:\dlib-master\build\temp.w
in-amd64-3.10\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\correlation_tracker.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Re
lease_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\cnn_face_detector.cpp) [D:\dlib-master\build\temp.win
-amd64-3.10\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\cnn_face_detector.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Rele
ase_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\image_dataset_metadata.cpp) [D:\dlib-master\build\tem
p.win-amd64-3.10\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\image_dataset_metadata.cpp) [D:\dlib-master\build\temp.win-amd64-3.10
\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\global_optimization.cpp) [D:\dlib-master\build\temp.w
in-amd64-3.10\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\global_optimization.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Re
lease_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\numpy_returns.cpp) [D:\dlib-master\build\temp.win-amd
64-3.10\Release_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\numpy_returns.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Release
dlib_pybind11.vcxproj]
line.cpp
gui.cpp
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\gui.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Re
lease_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\gui.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Release_dlib_pybi
nd11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,22): error C2065: 'ssize_t': identificador não declar
ado (compilando arquivo de origem D:\dlib-master\tools\python\src\line.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\R
elease_dlib_pybind11.vcxproj]
D:\dlib-master\dlib\external\pybind11\include\pybind11/numpy.h(35,31): error C2338: ssize_t != Py_intptr_t (compilando
arquivo de origem D:\dlib-master\tools\python\src\line.cpp) [D:\dlib-master\build\temp.win-amd64-3.10\Release_dlib_pyb
ind11.vcxproj]
Traceback (most recent call last):
File "D:\dlib-master\setup.py", line 222, in
setup(
File "D:\Python\lib\site-packages\setuptools_init
.py", line 153, in setup
return distutils.core.setup(**attrs)
File "D:\Python\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "D:\Python\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "D:\Python\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "D:\Python\lib\site-packages\setuptools\command\install.py", line 67, in run
self.do_egg_install()
File "D:\Python\lib\site-packages\setuptools\command\install.py", line 109, in do_egg_install
self.run_command('bdist_egg')
File "D:\Python\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\Python\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "D:\Python\lib\site-packages\setuptools\command\bdist_egg.py", line 164, in run
cmd = self.call_command('install_lib', warn_dir=0)
File "D:\Python\lib\site-packages\setuptools\command\bdist_egg.py", line 150, in call_command
self.run_command(cmdname)
File "D:\Python\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\Python\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "D:\Python\lib\site-packages\setuptools\command\install_lib.py", line 11, in run
self.build()
File "D:\Python\lib\distutils\command\install_lib.py", line 107, in build
self.run_command('build_ext')
File "D:\Python\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "D:\Python\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "D:\dlib-master\setup.py", line 134, in run
self.build_extension(ext)
File "D:\dlib-master\setup.py", line 174, in build_extension
subprocess.check_call(cmake_build, cwd=build_folder)
File "D:\Python\lib\subprocess.py", line 369, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--config', 'Release', '--', '/m']' returned non-zero exit status 1.
`

I tried both the pip install dlib and the manual instalation and it resulted in the same error. It problably is related to the compiler, wich is Visual Studio 2019 in my case, but I am not so sure.
If anyone could clarify this I would be thankfull

@insung3511
Copy link
Author

I think we got some problem that build something. I'm still researching to solve it. I hope u too

@insung3511
Copy link
Author

I don't know how does do make success but I think we need to install it manually. I think maybe I did clone this and manually I installed it. I'm not sure how did I. Anyway I'm really hope u find a error and tell me if u got a trouble with this. Let's find more solution 👍

@MarcioJrios
Copy link

MarcioJrios commented Oct 7, 2021

I didn't managed to solve my problem with the instalation on windows, but i managed to pass by it (after quite a long effort) by using a WSL, wich i don't think will help in your case considering the platform you are running it on.
What i sugest is that you try the manual instalation if you haven't already, and check if you have an available C/C++ compiler, as this problem is problably related to this.

@insung3511
Copy link
Author

I think we got a other issue now, you need a someone who using windows. Sorry bro.

@dlib-issue-bot
Copy link
Collaborator

Warning: this issue has been inactive for 35 days and will be automatically closed on 2021-11-26 if there is no further activity.

If you are waiting for a response but haven't received one it's possible your question is somehow inappropriate. E.g. it is off topic, you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's official compilation instructions, dlib's API documentation, or a Google search.

@dlib-issue-bot
Copy link
Collaborator

Warning: this issue has been inactive for 42 days and will be automatically closed on 2021-11-26 if there is no further activity.

If you are waiting for a response but haven't received one it's possible your question is somehow inappropriate. E.g. it is off topic, you didn't follow the issue submission instructions, or your question is easily answerable by reading the FAQ, dlib's official compilation instructions, dlib's API documentation, or a Google search.

@dlib-issue-bot
Copy link
Collaborator

Notice: this issue has been closed because it has been inactive for 45 days. You may reopen this issue if it has been closed in error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants