日志3-环境部署

face_recognition/README_Simplified_Chinese.md at master · ageitgey/face_recognition · GitHub
face recognition

一、安装dlib库

1、更新pip、setuptools、wheel

  • pip:Python 包管理工具,该工具提供了对Python 包的查找、下载、安装、卸载的功能。

  • setuptools:

  • wheel

 F:\python3.9.9\python.exe -m pip install --upgrade pip -i https://pypi.douban.com/simpl
Looking in indexes: https://pypi.douban.com/simpl
Requirement already satisfied: pip in f:\python3.9.9\lib\site-packages (21.2.4)
WARNING: You are using pip version 21.2.4; however, version 23.0.1 is available.
You should consider upgrading via the 'F:\python3.9.9\python.exe -m pip install --upgrade pip' command.
 F:\python3.9.9\python.exe -m pip install --upgrade setuptools -i https://pypi.douban.com/simpl
Looking in indexes: https://pypi.douban.com/simpl
Requirement already satisfied: setuptools in f:\python3.9.9\lib\site-packages (58.1.0)
WARNING: You are using pip version 21.2.4; however, version 23.0.1 is available.
You should consider upgrading via the 'F:\python3.9.9\python.exe -m pip install --upgrade pip' command.
 F:\python3.9.9\python.exe -m pip install --upgrade wheel -i https://pypi.douban.com/simpl
Looking in indexes: https://pypi.douban.com/simpl
ERROR: Could not find a version that satisfies the equirement wheel (from versions: none)
ERROR: No matching distribution found for wheel
WARNING: You are using pip version 21.2.4; however, version 23.0.1 is available.
You should consider upgrading via the 'F:\python3.9.9\python.exe -m pip install --upgrade pip' command.
pip list #确实没有安装wheel
pip install wheel -i https://pypi.douban.com/simple/
Looking in indexes: https://pypi.douban.com/simple/
Requirement already satisfied: wheel in f:\python3.9.9\lib\site-packages (0.38.4)
WARNING: You are using pip version 21.2.4; however, version 23.0.1 is available.
You should consider upgrading via the 'F:\python3.9.9\python.exe -m pip install --upgrade pip' command.
(13条消息) wheel安装+使用wheel安装第三方库+临时换源安装和永久换源安装_Jackey_Song_Odd的博客-CSDN博客

2、安装cmake、boost

pip install cmake -i https://pypi.douban.com/simple
pip install boost -i https://pypi.douban.com/simple

3、安装dlib

确定Python 3.9.9 对应dlib版本:最后下载的是dlib 19.19.0
最新 https://pypi.org/project/dlib/19.19.0/#files
python3.6及之前版本对应轮子 Links for dlib (pypi.org)
mark一下,未用 (13条消息) Python3.9 下载Dlib包_python下载dlib_土拨鼠1号的博客-CSDN博客
pip install dlib
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host=' pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/dlib/
ERROR: Could not find a version that satisfies the requirement dlib (from versions: none)
ERROR: No matching distribution found for dlib
WARNING: You are using pip version 21.2.4; however, version 23.0.1 is available.
You should consider upgrading via the 'F:\python3.9.9\python.exe -m pip install --upgrade pip' command.
pip install dlib==19.19.0 -i https://pypi.douban.com/simple
Looking in indexes: https://pypi.douban.com/simple
Collecting dlib==19.19.0
Downloading https://pypi.doubanio.com/packages/63/92/05c3b98636661cb80d190a5a777dd94effcc14c0f6893222e5ca81e74fbc/dlib-19.19.0.tar.gz (3.2 MB)
|████████████████████████████████| 3.2 MB 1.1 MB/s
Building wheels for collected packages: dlib
Building wheel for dlib (setup.py) ... done
Created wheel for dlib: filename=dlib-19.19.0-cp39-cp39-win_amd64.whl size=2899905 sha256=122bf0f2a2201779e1e3812b00702dd0774b3511b3b4e5570f19ae496401b068
Stored in directory: c:\users\86181\appdata\local\pip\cache\wheels\4c\31\66\e36128e4afff7e58529f34ffcb2e0632ddb8c9949ed9c7867c
Successfully built dlib
Installing collected packages: dlib
Successfully installed dlib-19.19.0
WARNING: You are using pip version 21.2.4; however, version 23.0.1 is available.
You should consider upgrading via the 'F:\python3.9.9\python.exe -m pip install --upgrade pip' command.

二、安装 face_recognition

1、准备gcc/g++

安装dlib的时候可能会出问题,因为dlib需要编译,出现的问题一般是gcc或者g++版本的问题,所以在pip install face_recognition之前,可以通过在命令行键入,指定gcc和g++对应的位置

为什么?
#linux版本
export CC=/usr/local/bin/gcc
export CXX=/usr/local/bin/g++  
发现没有gcc\g++命令
【有效】 (13条消息) 【已解决】win10终端编译C语言脚本,报"gcc不是内部或外部命令,也不是可运行的程序或批处理文件"_gcc不是内部或外部命令,也不是可运行的程序_Point酱的博客-CSDN博客
安装mingw
mingw下载地址: https://sourceforge.net/projects/mingw/files/latest/download
图形界面安装失败,换用命令行
命令行安装
【有效】 win10 解决“ 'g++' 不是内部或外部命令,也不是可运行的程序或批处理文件”的问题 - 简书 (jianshu.com)
specs
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=f:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
mingw32
../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --with-gmp=/mingw --with-mpfr --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion=' MinGW.org../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --with-gmp=/mingw --with-mpfr --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --enable-libgomp --disable-libvtv --enable-nls
win32
gcc 6.3.0 ( MinGW.org GCC-6.3.0-1)
存在问题,gcc只存在于Mingw\bin下
(13条消息) windows10 Vscode+CMake+GCC/G++ 配置_vscode cmake g++_一夜空中最亮的星一的博客-CSDN博客
解决:添加环境变量

2、安装 face_recognition

pip install face_recognition -i https://pypi.douban.com/simple/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值