cessfully installed Mastodon.py-2.0.1 blurhash-1.1.4 boost-0.1 certifi-2025.4.26 charset_normalizer-3.4.2 decorator-5.2.1 greenlet-3.2.3 idna-3.10 python-dateutil-2.9.0.post0 python-magic-bin-0.4.14 requests-2.32.4 six-1.17.0 sqlalchemy-2.0.41 typing-extensions-4.14.0 urllib3-2.4.0
[notice] A new release of pip is available: 23.2.1 -> 25.1.1
[notice] To update, run: python.exe -m pip install --upgrade pip
(.venv1) PS D:\OCR\AW> pip install dlib -i https://pypi.tuna.tsinghua.edu.cn/simple
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting dlib
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/28/f4/f8949b18ec1df2ef05fc2ea1d1dd82ff2d050b8704b7d0d088017315c221/dlib-20.0.0.tar.gz (3.3 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 4.9 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: dlib
Building wheel for dlib (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for dlib (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [48 lines of output]
running bdist_wheel
running build
running build_ext
Traceback (most recent call last):
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "D:\OCR\AW\.venv1\Scripts\cmake.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'cmake'
================================================================================
================================================================================
================================================================================
CMake is not installed on your system!
Or it is possible some broken copy of cmake is installed on your system.
It is unfortunately very common for python package managers to include
broken copies of cmake. So if the error above this refers to some file
path to a cmake file inside a python or anaconda or miniconda path then you
should delete that broken copy of cmake from your computer.
Instead, please get an official copy of cmake from one of these known good
sources of an official cmake:
- cmake.org (this is how windows users should get cmake)
- apt install cmake (for Ubuntu or Debian based systems)
- yum install cmake (for Redhat or CenOS based systems)
On a linux machine you can run `which cmake` to see what cmake you are
actually using. If it tells you it's some cmake from any kind of python
packager delete it and install an official cmake.
More generally, cmake is not installed if when you open a terminal window
and type
cmake --version
you get an error. So you can use that as a very basic test to see if you
have cmake installed. That is, if cmake --version doesn't run from the
same terminal window from which you are reading this error message, then
you have not installed cmake. Windows users should take note that they
need to tell the cmake installer to add cmake to their PATH. Since you
can't run commands that are not in your PATH. This is how the PATH works
on Linux as well, but failing to add cmake to the PATH is a particularly
common problem on windows and rarely a problem on Linux.
================================================================================
================================================================================
================================================================================
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for dlib
Failed to build dlib
ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projects
[notice] A new release of pip is available: 23.2.1 -> 25.1.1
[notice] To update, run: python.exe -m pip install --upgrade pip
(.venv1) PS D:\OCR\AW> import sys
import : 无法将“import”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 1
+ import sys
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (import:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
(.venv1) PS D:\OCR\AW> print(sys.executable) # 应显示自定义路径
sys.executable : 无法将“sys.executable”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。
所在位置 行:1 字符: 7
+ print(sys.executable) # 应显示自定义路径
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (sys.executable:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
(.venv1) PS D:\OCR\AW> pip uninstall cmake
Found existing installation: cmake 4.0.2
Uninstalling cmake-4.0.2:
Would remove:
d:\ocr\aw\.venv1\lib\site-packages\cmake-4.0.2.dist-info\*
d:\ocr\aw\.venv1\lib\site-packages\cmake\*
d:\ocr\aw\.venv1\scripts\ccmake.exe
d:\ocr\aw\.venv1\scripts\cmake.exe
d:\ocr\aw\.venv1\scripts\cpack.exe
d:\ocr\aw\.venv1\scripts\ctest.exe
Proceed (Y/n)? cmake --version # 应显示 ≥3.5 的版本
Your response ('cmake --version # 应显示 ≥3.5 的版本') was not one of the expected responses: y, n,
Proceed (Y/n)? Y
Successfully uninstalled cmake-4.0.2
(.venv1) PS D:\OCR\AW> cmake --version # 应显示 ≥3.5 的版本
cmake version 4.0.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
(.venv1) PS D:\OCR\AW> $env:VSCMD_ARG_TGT_ARCH = 'x64'
(.venv1) PS D:\OCR\AW> $env:Path += ";C:\Program Files (x86)\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x64"
(.venv1) PS D:\OCR\AW> # 使用清华镜像安装
(.venv1) PS D:\OCR\AW> pip install dlib==19.24.0 -i https://pypi.tuna.tsinghua.edu.cn/simple --no-cache-dir
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting dlib==19.24.0
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e5/3b/7a8522a5c2ef6ff6252e46b0788b3d2c2280198c49d6ecf3b576b171045f/dlib-19.24.0.tar.gz (3.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 6.0 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [60 lines of output]
running bdist_wheel
running build
running build_py
running build_ext
C:\Users\Admin\AppData\Local\Temp\pip-install-ax2yzknp\dlib_0adc76f556db44bd8f9f76c52f05b10a\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.9.13 (tags/v3.9.13:6de2ca5, May 17 2022, 16:36:42) [MSC v.1929 64 bit (AMD64)]
Invoking CMake setup: 'cmake C:\Users\Admin\AppData\Local\Temp\pip-install-ax2yzknp\dlib_0adc76f556db44bd8f9f76c52f05b10a\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Admin\AppData\Local\Temp\pip-install-ax2yzknp\d
lib_0adc76f556db44bd8f9f76c52f05b10a\build\lib.win-amd64-cpython-39 -DPYTHON_EXECUTABLE=D:\OCR\AW\.venv1\Scripts\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Admin\AppData\Local\Temp\pip-install-ax2yzknp\dlib_0adc76f556db44bd8f9f76c52f05b10a\build\lib.win-amd64-cpython-39 -A x64'
-- Building for: Visual Studio 17 2022
CMake Error at CMakeLists.txt:2 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 3.5 has been removed from CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
to work with policies introduced by <max> or earlier.
Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\Admin\AppData\Local\Temp\pip-install-ax2yzknp\dlib_0adc76f556db44bd8f9f76c52f05b10a\setup.py", line 222, in <module>
setup(
File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\__init__.py", line 103, in setup
return distutils.core.setup(**attrs)
File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\dist.py", line 1001, in run_command
super().run_command(command)
File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "D:\OCR\AW\.venv1\lib\site-packages\wheel\bdist_wheel.py", line 364, in run
self.run_command("build")
File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\dist.py", line 1001, in run_command
super().run_command(command)
File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
self.run_command(cmd_name)
File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\dist.py", line 1001, in run_command
super().run_command(command)
File "D:\OCR\AW\.venv1\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "C:\Users\Admin\AppData\Local\Temp\pip-install-ax2yzknp\dlib_0adc76f556db44bd8f9f76c52f05b10a\setup.py", line 134, in run
self.build_extension(ext)
File "C:\Users\Admin\AppData\Local\Temp\pip-install-ax2yzknp\dlib_0adc76f556db44bd8f9f76c52f05b10a\setup.py", line 171, in build_extension
subprocess.check_call(cmake_setup, cwd=build_folder)
File "C:\Users\Admin\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-ax2yzknp\\dlib_0adc76f556db44bd8f9f76c52f05b10a\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Admin\\AppD
ata\\Local\\Temp\\pip-install-ax2yzknp\\dlib_0adc76f556db44bd8f9f76c52f05b10a\\build\\lib.win-amd64-cpython-39', '-DPYTHON_EXECUTABLE=D:\\OCR\\AW\\.venv1\\Scripts\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Admin\\AppData\\Local\\Temp\\pip-install-ax2yzknp\\dlib_0adc76f556db44bd8f9f76c52f05b10a\\build\\lib.win-amd64-cpython-39', '-A', 'x64']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for dlib
Running setup.py clean for dlib
Failed to build dlib
ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projects
[notice] A new release of pip is available: 23.2.1 -> 25.1.1
[notice] To update, run: python.exe -m pip install --upgrade pip
(.venv1) PS D:\OCR\AW> # 直接安装预编译的 whl 文件(需匹配 Python 版本)
(.venv1) PS D:\OCR\AW> pip install https://files.pythonhosted.org/packages/0e/ce/f8a3cff33ac03a8219768f0697c76b04dc5c3b0d6ad5f8c1b092bd8e9a6/dlib-19.24.0-cp39-cp39-win_amd64.whl
Collecting dlib==19.24.0
ERROR: HTTP error 404 while getting https://files.pythonhosted.org/packages/0e/ce/f8a3cff33ac03a8219768f0697c76b04dc5c3b0d6ad5f8c1b092bd8e9a6/dlib-19.24.0-cp39-cp39-win_amd64.whl
ERROR: Could not install requirement dlib==19.24.0 from https://files.pythonhosted.org/packages/0e/ce/f8a3cff33ac03a8219768f0697c76b04dc5c3b0d6ad5f8c1b092bd8e9a6/dlib-19.24.0-cp39-cp39-win_amd64.whl because of HTTP error 404 Clien
t Error: Not Found for url: https://files.pythonhosted.org/packages/0e/ce/f8a3cff33ac03a8219768f0697c76b04dc5c3b0d6ad5f8c1b092bd8e9a6/dlib-19.24.0-cp39-cp39-win_amd64.whl for URL https://files.pythonhosted.org/packages/0e/ce/f8a3cff33ac03a8219768f0697c76b04dc5c3b0d6ad5f8c1b092bd8e9a6/dlib-19.24.0-cp39-cp39-win_amd64.whl
[notice] A new release of pip is available: 23.2.1 -> 25.1.1
[notice] To update, run: python.exe -m pip install --upgrade pip
(.venv1) PS D:\OCR\AW>