安装 dlib python 3.9.6 的问题

问题描述 投票:0回答:0

PS C:\Deepankar\Projects\VaibhavBhaiya-IntruderDetection\PHASE-II> pip 安装人脸识别 查看索引:https://pypi.org/simplehttps://pypi.ngc.nvidia.com 收脸 下载 face-22.0.0-py3-none-any.whl (54 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━-154kta/54.5kta/54kta/ :00:00 错误:找不到满足需求识别的版本(来自版本:无) 错误:没有找到匹配的识别分布

[通知] pip 新版本发布:23.0 -> 23.0.1 [注意] 要更新,运行:python.exe -m pip install --upgrade pip PS C:\Deepankar\Projects\VaibhavBhaiya-IntruderDetection\PHASE-II> python.exe -m pip install --upgrade pip 查看索引:https://pypi.org/simplehttps://pypi.ngc.nvidia.com 要求已经满足:pip in c:\users\deepa ppdata\local\programs\python\python39\lib\site-packages (23.0) 收集点 下载 pip-23.0.1-py3-none-any.whl (2.1 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━..1.1/2.1 :00:00 安装收集的包:pip 正在尝试卸载:pip 找到现有安装:pip 23.0 卸载 pip-23.0: 成功卸载 pip-23.0 错误:由于 OSError 无法安装软件包:[WinError 5] 访问被拒绝:'C:\Users\deepa\AppData\Local\Temp\pip-uninstall-1kkyucgz\pip.exe' 考虑使用 --user 选项或检查权限。

PS C:\Deepankar\Projects\VaibhavBhaiya-IntruderDetection\PHASE-II> python.exe -m pip install --user --upgrade pip 查看索引:https://pypi.org/simplehttps://pypi.ngc.nvidia.com 要求已经满足:pip in c:\users\deepa ppdata\local\programs\python\python39\lib\site-packages (23.0.1) PS C:\Deepankar\Projects\VaibhavBhaiya-IntruderDetection\PHASE-II> pip install dlib 查看索引:https://pypi.org/simplehttps://pypi.ngc.nvidia.com 收集 dlib 下载 dlib-19.24.0.tar.gz (3.2 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━??2.2 kB/3.2 kB/3 :00:00 准备元数据(setup.py)...完成 为收集的包构建轮子:dlib dlib(setup.py)的构建轮...错误 错误:子进程因错误而退出

× python setup.py bdist_wheel 没有运行成功。 │ 退出代码:1 ╰─>【68行输出】 运行 bdist_wheel 运行构建 运行 build_py 运行 build_ext C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\setup.py:129: DeprecationWarning: distutils 版本类已弃用。请改用 packaging.version。 如果松散版本(cmake_version)< '3.1.0': Building extension for Python 3.9.6 (tags/v3.9.6:db3ff76, Jun 28 2021, 15:26:21) [MSC v.1929 64 bit (AMD64)] Invoking CMake setup: 'cmake C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\build\lib.win-amd64-cpython-39 -DPYTHON_EXECUTABLE=C:\Users\deepa\AppData\Local\Programs\Python\Python39\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\build\lib.win-amd64-cpython-39 -A x64' -- Building for: NMake Makefiles CMake Error at CMakeLists.txt:5 (message):

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


    You must use Visual Studio to build a python extension on windows.  If you
    are getting this error it means you have not installed Visual C++.  Note
    that there are many flavors of Visual Studio, like Visual Studio for C#
    development.  You need to install Visual Studio for C++.


    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!




  -- 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\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\setup.py", line 222, in <module>    
      setup(
    File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\__init__.py", line 87, in setup
      return distutils.core.setup(**attrs)
    File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\core.py", line 185, in setup       
      return run_commands(dist)
    File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
      dist.run_commands()
    File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py", line 1208, in run_command
      super().run_command(command)
    File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command 
      cmd_obj.run()
    File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\wheel\bdist_wheel.py", line 325, in run
      self.run_command("build")
    File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command  
      self.distribution.run_command(command)
    File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py", line 1208, in run_command
      super().run_command(command)
    File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command 
      cmd_obj.run()
    File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\command\build.py", line 132, in run
      self.run_command(cmd_name)
    File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command  
      self.distribution.run_command(command)
    File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\dist.py", line 1208, in run_command
      super().run_command(command)
    File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command 
      cmd_obj.run()
    File "C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\setup.py", line 134, in run
      self.build_extension(ext)
    File "C:\Users\deepa\AppData\Local\Temp\pip-install-hakhwrt8\dlib_d175b3b197704551a11d650b52da49e5\setup.py", line 171, in build_extension
      subprocess.check_call(cmake_setup, cwd=build_folder)
    File "C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 373, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\deepa\\AppData\\Local\\Temp\\pip-install-hakhwrt8\\dlib_d175b3b197704551a11d650b52da49e5\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\deepa\\AppData\\Local\\Temp\\pip-install-hakhwrt8\\dlib_d175b3b197704551a11d650b52da49e5\\build\\lib.win-amd64-cpython-39', '-DPYTHON_EXECUTABLE=C:\\Users\\deepa\\AppData\\Local\\Programs\\Python\\Python39\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\deepa\\AppData\\Local\\Temp\\pip-install-hakhwrt8\\dlib_d175b3b197704551a11d650b52da49e5\\build\\lib.win-amd64-cpython-39', '-A', 'x64']' returned non-zero exit status 1.
  [end of output]

注意:此错误源自子进程,可能不是 pip 的问题。 错误:dlib 的构建轮失败 为 dlib 运行 setup.py clean 构建 dlib 失败 安装收集的包:dlib 为 dlib 运行 setup.py install ... 错误 错误:子进程因错误而退出

× running setup.py install for dlib 没有运行成功。 │ 退出代码:1 ╰─> [72行输出] 运行安装 C:\Users\deepa\AppData\Local\Programs\Python\Python39\lib\site-packages\setuptool

python dlib
© www.soinside.com 2019 - 2024. All rights reserved.