当前位置: 首页 > news >正文

mpiigaze的安装过程一

mpiigaze链接

mpiigaze应该不是作者本人写的,而是社区工作者的杰作,对原论文Appearance-Based Gaze Estimation in the Wild的代码进行的一些复现

1.创建conda环境

2.问题

Building wheels for collected packages: dlibBuilding wheel for dlib (pyproject.toml) ... errorerror: subprocess-exited-with-error× Building wheel for dlib (pyproject.toml) did not run successfully.│ exit code: 1╰─> [41 lines of output]running bdist_wheelrunning buildrunning build_ext================================================================================================================================================================================================================================================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 includebroken copies of cmake.  So if the error above this refers to some filepath to a cmake file inside a python or anaconda or miniconda path then youshould delete that broken copy of cmake from your computer.Instead, please get an official copy of cmake from one of these known goodsources 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 areactually using.  If it tells you it's some cmake from any kind of pythonpackager delete it and install an official cmake.More generally, cmake is not installed if when you open a terminal windowand typecmake --versionyou get an error.  So you can use that as a very basic test to see if youhave cmake installed.  That is, if cmake --version doesn't run from thesame terminal window from which you are reading this error message, thenyou have not installed cmake.  Windows users should take note that theyneed to tell the cmake installer to add cmake to their PATH.  Since youcan't run commands that are not in your PATH.  This is how the PATH workson Linux as well, but failing to add cmake to the PATH is a particularlycommon 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: ERROR: Failed to build installable wheels for some pyproject.toml based projects (dlib)

问题是系统上没有安装 CMake,或者安装的 CMake 是损坏的/不正确的版本,导致 dlib 库无法成功构建。

dlib 是一个 C++ 库,它提供了很多机器学习算法,包括人脸检测和地标检测等功能。当你在 Python 中安装 dlib 时,它需要先编译 C++ 代码,而这个编译过程依赖于 CMake。

第一种安装是:sudo apt install cmake这个需要sudo权限

然而我没有sudo权限,

[sudo] password for zhouy24: 
zhouy24 is not in the sudoers file.  This incident will be reported.

所以使用不需要sudo的方式:
由于我使用conda创建环境了,所以 使用命令:conda install -c anaconda cmake 指定从 anaconda 频道安装,这通常更稳定。

(mpiigaze) zhouy24@RL-DSlab:~/zhouy24Files/mpiigaze/pytorch_mpiigaze$ conda install -c anaconda cmake
Channels:- anaconda- conda-forge- defaults
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: done## Package Plan ##environment location: /home/zhouy24/miniconda3/envs/mpiigazeadded / updated specs:- cmakeThe following packages will be downloaded:package                    |            build---------------------------|-----------------c-ares-1.19.1              |       h5eee18b_0         114 KB  anacondacmake-3.31.2               |       h27e300b_0        21.9 MB  anacondaexpat-2.7.1                |       h6a678d5_0         198 KB  anacondakrb5-1.21.3                |       h8a1dbc1_1         1.4 MB  anacondalibcurl-8.14.1             |       h31d0fb7_0         473 KB  anacondalibedit-3.1.20230828       |       h5eee18b_0         191 KB  anacondalibev-4.33                 |       h7f8727e_1         106 KB  anacondalibnghttp2-1.57.0          |       h2d74bed_0         705 KB  anacondalibsqlite-3.46.0           |       hde9e2c9_0         845 KB  conda-forgelibssh2-1.11.1             |       h251f7ec_0         294 KB  anacondalibuv-1.48.0               |       h5eee18b_0         1.1 MB  anacondalibxcb-1.17.0              |       h9b100fa_0         407 KB  anacondalibzlib-1.2.13             |       h4ab18f5_6          60 KB  conda-forgelz4-c-1.9.4                |       h6a678d5_1         161 KB  anacondapthread-stubs-0.3          |       h0ce48e5_1           5 KB  anacondapython-3.8.20              |       he870216_0        24.3 MB  anacondarhash-1.4.3                |       hdbd6064_0         256 KB  anacondasqlite-3.50.2              |       hb25bd0a_1         1.6 MB  anacondatk-8.6.14                  |       h993c535_1         3.4 MB  anacondaxorg-libx11-1.8.12         |       h9b100fa_1         922 KB  anacondaxorg-libxau-1.0.12         |       h9b100fa_0          14 KB  anacondaxorg-libxdmcp-1.1.5        |       h9b100fa_0          20 KB  anacondaxorg-xorgproto-2024.1      |       h5eee18b_1         560 KB  anacondazlib-1.2.13                |       h4ab18f5_6          91 KB  conda-forgezstd-1.5.6                 |       hc292b87_0         1.0 MB  anaconda------------------------------------------------------------Total:        59.9 MBThe following NEW packages will be INSTALLED:c-ares             anaconda/linux-64::c-ares-1.19.1-h5eee18b_0 cmake              anaconda/linux-64::cmake-3.31.2-h27e300b_0 expat              anaconda/linux-64::expat-2.7.1-h6a678d5_0 krb5               anaconda/linux-64::krb5-1.21.3-h8a1dbc1_1 libcurl            anaconda/linux-64::libcurl-8.14.1-h31d0fb7_0 libedit            anaconda/linux-64::libedit-3.1.20230828-h5eee18b_0 libev              anaconda/linux-64::libev-4.33-h7f8727e_1 libnghttp2         anaconda/linux-64::libnghttp2-1.57.0-h2d74bed_0 libssh2            anaconda/linux-64::libssh2-1.11.1-h251f7ec_0 libuv              anaconda/linux-64::libuv-1.48.0-h5eee18b_0 libxcb             anaconda/linux-64::libxcb-1.17.0-h9b100fa_0 lz4-c              anaconda/linux-64::lz4-c-1.9.4-h6a678d5_1 pthread-stubs      anaconda/linux-64::pthread-stubs-0.3-h0ce48e5_1 rhash              anaconda/linux-64::rhash-1.4.3-hdbd6064_0 sqlite             anaconda/linux-64::sqlite-3.50.2-hb25bd0a_1 xorg-libx11        anaconda/linux-64::xorg-libx11-1.8.12-h9b100fa_1 xorg-libxau        anaconda/linux-64::xorg-libxau-1.0.12-h9b100fa_0 xorg-libxdmcp      anaconda/linux-64::xorg-libxdmcp-1.1.5-h9b100fa_0 xorg-xorgproto     anaconda/linux-64::xorg-xorgproto-2024.1-h5eee18b_1 zlib               conda-forge/linux-64::zlib-1.2.13-h4ab18f5_6 zstd               anaconda/linux-64::zstd-1.5.6-hc292b87_0 The following packages will be UPDATED:tk                 conda-forge::tk-8.6.13-noxft_hd72426e~ --> anaconda::tk-8.6.14-h993c535_1 The following packages will be SUPERSEDED by a higher-priority channel:python             conda-forge::python-3.8.20-h4a871b0_2~ --> anaconda::python-3.8.20-he870216_0 The following packages will be DOWNGRADED:libsqlite                               3.50.3-hee844dc_0 --> 3.46.0-hde9e2c9_0 libzlib                                  1.3.1-hb9d3cd8_2 --> 1.2.13-h4ab18f5_6 Proceed ([y]/n)? yDownloading and Extracting Packages:Preparing transaction: done                                                                                                                                                    
Verifying transaction: done                                                                                                                                                    
Executing transaction: done                   

验证安装:

cmake --version

如果在 Conda 环境中成功安装,当你激活该环境时,cmake --version 应该可以正常运行。停用环境后,cmake 命令可能就找不到了。

(mpiigaze) zhouy24@RL-DSlab:~/zhouy24Files/mpiigaze/pytorch_mpiigaze$ cmake --version
cmake version 3.31.2    

之后使用pip下载命令:
(mpiigaze) zhouy24@RL-DSlab:~/zhouy24Files/mpiigaze/pytorch_mpiigaze$ pip install -r requirements.txt
除去一堆下载之外,最重要的是:

Building wheels for collected packages: dlibBuilding wheel for dlib (pyproject.toml) ... doneCreated wheel for dlib: filename=dlib-20.0.0-cp38-cp38-linux_x86_64.whl size=3973919 sha256=3a6b5f5508cafa89392278cba89fa01cd5e953506f7e96208b19651e9e405f53Stored in directory: /home/zhouy24/.cache/pip/wheels/29/a3/42/e1f8773f2019449881db7ae7488211a3b3e97a72e21b944970
Successfully built dlib
Installing collected packages: pytz, mpmath, dlib, tzdata, typing-extensions, tqdm, termcolor, tabulate, sympy, six, pyyaml, protobuf, portalocker, Pillow, packaging, nvidia-nvtx-cu12, nvidia-nvjitlink-cu12, nvidia-nccl-cu12, nvidia-curand-cu12, nvidia-cufft-cu12, nvidia-cuda-runtime-cu12, nvidia-cuda-nvrtc-cu12, nvidia-cuda-cupti-cu12, nvidia-cublas-cu12, numpy, networkx, MarkupSafe, fsspec, filelock, yacs, triton, tensorboardX, scipy, python-dateutil, opencv-python, nvidia-cusparse-cu12, nvidia-cudnn-cu12, jinja2, iopath, h5py, pandas, nvidia-cusolver-cu12, fvcore, torch, torchvision
Successfully installed MarkupSafe-2.1.5 Pillow-10.4.0 dlib-20.0.0 filelock-3.16.1 fsspec-2025.3.0 fvcore-0.1.5.post20221221 h5py-3.11.0 iopath-0.1.10 jinja2-3.1.6 mpmath-1.3.0 networkx-3.1 numpy-1.24.4 nvidia-cublas-cu12-12.1.3.1 nvidia-cuda-cupti-cu12-12.1.105 nvidia-cuda-nvrtc-cu12-12.1.105 nvidia-cuda-runtime-cu12-12.1.105 nvidia-cudnn-cu12-9.1.0.70 nvidia-cufft-cu12-11.0.2.54 nvidia-curand-cu12-10.3.2.106 nvidia-cusolver-cu12-11.4.5.107 nvidia-cusparse-cu12-12.1.0.106 nvidia-nccl-cu12-2.20.5 nvidia-nvjitlink-cu12-12.9.86 nvidia-nvtx-cu12-12.1.105 opencv-python-4.12.0.88 packaging-25.0 pandas-2.0.3 portalocker-3.0.0 protobuf-5.29.5 python-dateutil-2.9.0.post0 pytz-2025.2 pyyaml-6.0.2 scipy-1.10.1 six-1.17.0 sympy-1.13.3 tabulate-0.9.0 tensorboardX-2.6.2.2 termcolor-2.4.0 torch-2.4.1 torchvision-0.19.1 tqdm-4.67.1 triton-3.0.0 typing-extensions-4.13.2 tzdata-2025.2 yacs-0.1.8
http://www.dtcms.com/a/285563.html

相关文章:

  • 【后端】.NET Core API框架搭建(10) --配置163邮件发送服务
  • 【锂电池剩余寿命预测】TCN时间卷积神经网络锂电池剩余寿命预测(Pytorch完整源码和数据)
  • C#之线程Thread
  • ARCS系统机器视觉实战(直播回放)
  • Huber Loss(胡贝损失)详解:稳健回归的秘密武器 + Python实现
  • Unity 堆栈分析实战指南 C#
  • Copula 回归与结构方程模型:R 语言构建多变量因果关系网络
  • 机器视觉的布料丝印应用
  • React条件渲染
  • 用 React-Three-Fiber 实现雪花下落与堆积效果:从零开始的 3D 雪景模拟
  • jvm分析篇---1、先认识下dump文件
  • Linux系统安装Docker及部署Node.js 20.15.0(含pnpm、pm2)完整指南
  • Docker部署前后端分离项目——多项目共享环境部署
  • GEV/POT/Markov/点过程/贝叶斯极值全解析;基于R语言的极值统计学
  • Camera相机人脸识别系列专题分析之十七:人脸特征检测FFD算法之libhci_face_camera_api.so 296点位人脸识别检测流程详解
  • vue2 面试题及详细答案150道(81 - 90)
  • 2025阿里云黑洞自救指南:从分钟级恢复到长效免疫的实战方案
  • RPG59.玩家拾取物品三:可拾取物品的提示UI
  • Excel批量生成SQL语句 Excel批量生成SQL脚本 Excel拼接sql
  • Android studio和gradle升级后的一些错误
  • YOLO 目标检测的改进方法
  • FastExcel:革新Java生态的高性能Excel处理引擎
  • [2025CVPR-目标检测方向]FSHNet:一种用于3D物体检测的全稀疏混合网络。
  • 如何为“地方升学导向型”语校建模?Prompt 框架下的宇都宫日建工科专门学校解析(7 / 500)
  • 20250718-6-Kubernetes 调度-Pod对象:环境变量,初始容器,静态_笔记
  • Python练习(6)Python面向对象编程三大特性:封装、继承与多态的15道实战练习题(含答案与深度解析)
  • 一文讲透HTML语义化标签
  • sqli-labs靶场通关笔记:第27-28a关 union、select过滤
  • Maven下载安装与idea配置
  • 2G和3G网络关闭/退网状态(截止2025年7月)