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

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.xdnf.cn/news/15682.html

相关文章:

  • 美团闪购最新版 mtgsig1.2
  • 语音大模型速览(三)- cosyvoice2
  • Maven学习总结(62)—— Maven 打包瘦身和提速解决方案
  • 应急响应-Windows资源监视器
  • HTTPie: 开发者友好的http客户端工具
  • 深度学习零基础入门(3)-图像与神经网络
  • 读书笔记(学会说话)
  • 嵌入式系统内核镜像相关(十六)
  • 数据查找 二叉查找树
  • # Redis-stable 如何在Linux系统上安装和配置
  • java常见的jvm内存分析工具
  • C语言-一维数组,二维数组
  • 菱形继承 虚继承
  • 快速安装GitLab指南
  • go安装使用gin 框架
  • web3 区块链技术与用
  • 【论文精读】基于共识的分布式量子分解算法用于考虑最优传输线切换的安全约束机组组合
  • Django母婴商城项目实践(五)- 数据模型的搭建
  • UniApp TabBar 用户头像方案:绕过原生限制的实践
  • Selenium 攻略:从元素操作到 WebDriver 实战
  • STM32之L298N电机驱动模块
  • 【iOS】MRC与ARC
  • Fish Speech:开源多语言语音合成的革命性突破
  • 伺服电机与步进电机要点详解
  • 专题:2025智能体研究报告|附70份报告PDF、原数据表汇总下载
  • 质变科技亮相可信数据库发展大会,参编《数据库发展研究报告2025》
  • Linux学习之认识Linux的基本指令
  • 前端性能优化“核武器”:新一代图片格式(AVIF/WebP)与自动化优化流程实战
  • 多模态大模型重构人机交互,全感官时代已来
  • 微服务项目总结