命令行运行pip install dlib==19.24.0 --no-cache-dir --verbose报错:
Using pip 25.1.1 from D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\Lib\site-packages\pip (python 3.13)
Collecting dlib==19.24.0
Downloading dlib-19.24.0.tar.gz (3.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 100.9 kB/s eta 0:00:00
Running command python setup.py egg_info
C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\setup.py:212: SyntaxWarning: invalid escape sequence '\('
major = re.findall("set\(CPACK_PACKAGE_VERSION_MAJOR.*\"(.*)\"", open(cmake_file).read())[0]
C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\setup.py:213: SyntaxWarning: invalid escape sequence '\('
minor = re.findall("set\(CPACK_PACKAGE_VERSION_MINOR.*\"(.*)\"", open(cmake_file).read())[0]
C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\setup.py:214: SyntaxWarning: invalid escape sequence '\('
patch = re.findall("set\(CPACK_PACKAGE_VERSION_PATCH.*\"(.*)\"", open(cmake_file).read())[0]
C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\setup.py:194: SetuptoolsDeprecationWarning: The test command is disabled and references to it are deprecated.
!!
********************************************************************************
Please remove any references to `setuptools.command.test` in all supported versions of the affected package.
This deprecation is overdue, please update your project and remove deprecated
calls to avoid build errors in the future.
********************************************************************************
!!
from setuptools.command.test import test as TestCommand
D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\_distutils\dist.py:289: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
running egg_info
creating C:\Users\徐庆凯\AppData\Local\Temp\pip-pip-egg-info-x4hwlbut\dlib.egg-info
writing C:\Users\徐庆凯\AppData\Local\Temp\pip-pip-egg-info-x4hwlbut\dlib.egg-info\PKG-INFO
writing dependency_links to C:\Users\徐庆凯\AppData\Local\Temp\pip-pip-egg-info-x4hwlbut\dlib.egg-info\dependency_links.txt
writing top-level names to C:\Users\徐庆凯\AppData\Local\Temp\pip-pip-egg-info-x4hwlbut\dlib.egg-info\top_level.txt
writing manifest file 'C:\Users\徐庆凯\AppData\Local\Temp\pip-pip-egg-info-x4hwlbut\dlib.egg-info\SOURCES.txt'
reading manifest file 'C:\Users\徐庆凯\AppData\Local\Temp\pip-pip-egg-info-x4hwlbut\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*'
no previously-included directories found matching 'dlib\test'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
writing manifest file 'C:\Users\徐庆凯\AppData\Local\Temp\pip-pip-egg-info-x4hwlbut\dlib.egg-info\SOURCES.txt'
Preparing metadata (setup.py) ... done
Building wheels for collected packages: dlib
DEPRECATION: Building 'dlib' using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the `--use-pep517` option, (possibly combined with `--no-build-isolation`), or adding a `pyproject.toml` file to the source tree of 'dlib'. Discussion can be found at https://github.com/pypa/pip/issues/6334
Running command python setup.py bdist_wheel
C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\setup.py:212: SyntaxWarning: invalid escape sequence '\('
major = re.findall("set\(CPACK_PACKAGE_VERSION_MAJOR.*\"(.*)\"", open(cmake_file).read())[0]
C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\setup.py:213: SyntaxWarning: invalid escape sequence '\('
minor = re.findall("set\(CPACK_PACKAGE_VERSION_MINOR.*\"(.*)\"", open(cmake_file).read())[0]
C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\setup.py:214: SyntaxWarning: invalid escape sequence '\('
patch = re.findall("set\(CPACK_PACKAGE_VERSION_PATCH.*\"(.*)\"", open(cmake_file).read())[0]
C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\setup.py:194: SetuptoolsDeprecationWarning: The test command is disabled and references to it are deprecated.
!!
********************************************************************************
Please remove any references to `setuptools.command.test` in all supported versions of the affected package.
This deprecation is overdue, please update your project and remove deprecated
calls to avoid build errors in the future.
********************************************************************************
!!
from setuptools.command.test import test as TestCommand
D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\_distutils\dist.py:289: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
running bdist_wheel
running build
running build_py
running build_ext
C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\setup.py:129: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
if LooseVersion(cmake_version) < '3.1.0':
Building extension for Python 3.13.5 (tags/v3.13.5:6cb20a2, Jun 11 2025, 16:15:46) [MSC v.1943 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\build\lib.win-amd64-cpython-313 -DPYTHON_EXECUTABLE=D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\build\lib.win-amd64-cpython-313 -A x64'
Traceback (most recent call last):
File "<string>", line 2, in <module>
exec(compile('''
~~~~^^^^^^^^^^^^
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<32 lines>...
exec(compile(setup_py_code, filename, "exec"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
''' % ('C:\\Users\\徐庆凯\\AppData\\Local\\Temp\\pip-install-1bugzpia\\dlib_3252fe8772d348fc97cbac2fb469313f\\setup.py',), "<pip-setuptools-caller>", "exec"))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<pip-setuptools-caller>", line 35, in <module>
File "C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\setup.py", line 222, in <module>
setup(
~~~~~^
name='dlib',
^^^^^^^^^^^^
...<38 lines>...
],
^^
)
^
File "D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\__init__.py", line 115, in setup
return distutils.core.setup(**attrs)
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\_distutils\core.py", line 186, in setup
return run_commands(dist)
File "D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\_distutils\core.py", line 202, in run_commands
dist.run_commands()
~~~~~~~~~~~~~~~~~^^
File "D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\_distutils\dist.py", line 1002, in run_commands
self.run_command(cmd)
~~~~~~~~~~~~~~~~^^^^^
File "D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\dist.py", line 1102, in run_command
super().run_command(command)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\_distutils\dist.py", line 1021, in run_command
cmd_obj.run()
~~~~~~~~~~~^^
File "D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\command\bdist_wheel.py", line 370, in run
self.run_command("build")
~~~~~~~~~~~~~~~~^^^^^^^^^
File "D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\_distutils\cmd.py", line 357, in run_command
self.distribution.run_command(command)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\dist.py", line 1102, in run_command
super().run_command(command)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\_distutils\dist.py", line 1021, in run_command
cmd_obj.run()
~~~~~~~~~~~^^
File "D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\_distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
~~~~~~~~~~~~~~~~^^^^^^^^^^
File "D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\_distutils\cmd.py", line 357, in run_command
self.distribution.run_command(command)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\dist.py", line 1102, in run_command
super().run_command(command)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\_distutils\dist.py", line 1021, in run_command
cmd_obj.run()
~~~~~~~~~~~^^
File "C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\setup.py", line 134, in run
self.build_extension(ext)
~~~~~~~~~~~~~~~~~~~~^^^^^
File "C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\Lib\subprocess.py", line 419, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\徐庆凯\\AppData\\Local\\Temp\\pip-install-1bugzpia\\dlib_3252fe8772d348fc97cbac2fb469313f\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\徐庆凯\\AppData\\Local\\Temp\\pip-install-1bugzpia\\dlib_3252fe8772d348fc97cbac2fb469313f\\build\\lib.win-amd64-cpython-313', '-DPYTHON_EXECUTABLE=D:\\Users\\徐庆凯\\AppData\\Local\\Programs\\Python\\Python313\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\徐庆凯\\AppData\\Local\\Temp\\pip-install-1bugzpia\\dlib_3252fe8772d348fc97cbac2fb469313f\\build\\lib.win-amd64-cpython-313', '-A', 'x64']' returned non-zero exit status 3221226505.
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
full command: 'D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\python.exe' -u -c '
exec(compile('"'"''"'"''"'"'
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
#
# - It imports setuptools before invoking setup.py, to enable projects that directly
# import from `distutils.core` to work with newer packaging standards.
# - It provides a clear error message when setuptools is not installed.
# - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
# setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
# manifest_maker: standard file '"'"'-c'"'"' not found".
# - It generates a shim setup.py, for handling setup.cfg-only projects.
import os, sys, tokenize, traceback
try:
import setuptools
except ImportError:
print(
"ERROR: Can not execute `setup.py` since setuptools failed to import in "
"the build environment with exception:",
file=sys.stderr,
)
traceback.print_exc()
sys.exit(1)
__file__ = %r
sys.argv[0] = __file__
if os.path.exists(__file__):
filename = __file__
with tokenize.open(__file__) as f:
setup_py_code = f.read()
else:
filename = "<auto-generated setuptools caller>"
setup_py_code = "from setuptools import setup; setup()"
exec(compile(setup_py_code, filename, "exec"))
'"'"''"'"''"'"' % ('"'"'C:\\Users\\徐庆凯\\AppData\\Local\\Temp\\pip-install-1bugzpia\\dlib_3252fe8772d348fc97cbac2fb469313f\\setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' bdist_wheel -d 'C:\Users\徐庆凯\AppData\Local\Temp\pip-wheel-m03b8zax'
cwd: C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\\
Building wheel for dlib (setup.py) ... error
ERROR: Failed building wheel for dlib
Running setup.py clean for dlib
Running command python setup.py clean
C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\setup.py:212: SyntaxWarning: invalid escape sequence '\('
major = re.findall("set\(CPACK_PACKAGE_VERSION_MAJOR.*\"(.*)\"", open(cmake_file).read())[0]
C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\setup.py:213: SyntaxWarning: invalid escape sequence '\('
minor = re.findall("set\(CPACK_PACKAGE_VERSION_MINOR.*\"(.*)\"", open(cmake_file).read())[0]
C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\setup.py:214: SyntaxWarning: invalid escape sequence '\('
patch = re.findall("set\(CPACK_PACKAGE_VERSION_PATCH.*\"(.*)\"", open(cmake_file).read())[0]
C:\Users\徐庆凯\AppData\Local\Temp\pip-install-1bugzpia\dlib_3252fe8772d348fc97cbac2fb469313f\setup.py:194: SetuptoolsDeprecationWarning: The test command is disabled and references to it are deprecated.
!!
********************************************************************************
Please remove any references to `setuptools.command.test` in all supported versions of the affected package.
This deprecation is overdue, please update your project and remove deprecated
calls to avoid build errors in the future.
********************************************************************************
!!
from setuptools.command.test import test as TestCommand
D:\Users\徐庆凯\AppData\Local\Programs\Python\Python313\Lib\site-packages\setuptools\_distutils\dist.py:289: UserWarning: Unknown distribution option: 'tests_require'
warnings.warn(msg)
running clean
removing 'build\temp.win-amd64-cpython-313' (and everything under it)
'build\lib.win-amd64-cpython-313' does not exist -- can't clean it
'build\bdist.win-amd64' does not exist -- can't clean it
'build\scripts-3.13' does not exist -- can't clean it
removing 'build'
Failed to build dlib
ERROR: Failed to build installable wheels for some pyproject.toml based projects (dlib)