当前位置: 首页 > 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.lryc.cn/news/592858.html

相关文章:

  • git:tag标签远程管理
  • 40+个常用的Linux指令——上
  • 告别宕机!Ubuntu自动重启定时任务设置(一键脚本/手动操作)
  • 目标框的位置以及大小的分布
  • 突破性量子芯片问世:电子与光子首次集成,开启量子技术规模化应用新篇章
  • git--gitlab
  • oracle 11.2.0.4 RAC下执行root.sh脚本报错
  • 参会邀请!2025世界人工智能大会合合信息技术交流日报名启动!
  • Django母婴商城项目实践(五)- 数据模型的搭建
  • Excel导出实战:从入门到精通 - 构建专业级数据报表的完整指南
  • C语言-一维数组,二维数组
  • Java HashMap 详解:从原理到实战
  • 【java 安全】 IO流
  • -lstdc++与-static-libstdc++的用法和差异
  • [2025CVPR-目标检测方向] CorrBEV:多视图3D物体检测
  • 基于极空间NAS+GL-MT6000路由器+Tailscale的零配置安全穿透方案
  • 40.限流规则
  • 数据排序
  • 二进制专项
  • 探索 Vue 3.6 的新玩法:Vapor 模式开启性能新篇章
  • 网安-DNSlog
  • DOM 文档对象模型
  • GI6E 加密GRID電碼通信SHELLCODE載入
  • 柴油机活塞cad【4张】三维图+设计说明书
  • RPG58.可拾取物品二:处理玩家拾取事件
  • vue2 面试题及详细答案150道(81 - 90)
  • android14截屏
  • C++进阶-红黑树(难度较高)
  • mysql复制延迟如何处理
  • 亚马逊新手如何快速上手广告运营,实现品牌曝光与销量提升?