其中几个需要注意的点
更换raspbian源和pip源, face_recognition在清华源里有, 所以我都换成了清华源
-
在更换pip源时, 创建了
~/.pip/pip.conf
并将其修改为[global] timeout = 6000 index-url = https://pypi.tuna.tsinghua.edu.cn/simple/ [install] # use-mirrors = true # mirros = https://pypi.tuna.tsinghua.edu.cn/simple/ trused-host = pypi.tuna.tsinghua.edu.cn
-
但在安装
face_recognition
时, pip首先指向的网站是https://www.piwheels.org, 这个网站速度极慢, 并且没有简单快捷的翻墙手段, 将其搜索得出另一个设置pip源的文件/etc/pip.cong
, 打开文件如下:[global] extra-index-url=https://www.piwheels.org/simple
将其注释掉后, pip还是不优先选择清华源.
通过命令
sudo pip3 install -i https://pypi.tuna.tsingua.edu.cn/simple
, 终于正确.但是有时候出现
OpenSSL.SSL.WantReadError
, 这应该是网络问题引起的, 重复执行可解, 类似的还有“please update hashed”