在anaconda中导入深度学习中人脸识别需要的python包

要想导入到tensorflow的环境中,先在anaconda prompt中先激活tensorflow,
输入: activate tensorflow
在这里插入图片描述
然后依次安装所需的包,我这边的顺序是numpy / scipy / matplotlib / scikit-learn/opencv-python/h5py/Pillow(开头大写)/requests/psutil

1.安装numpy
输入安装命令:pip install --index https://pypi.mirrors.ustc.edu.cn/simple/ numpy (注意numpy前要空格,之后的安装包也为如此,我用的这个地址挺顺利的,如上图我的之前安装过了)
pip install tensorflow-gpu==1.8 -i https://pypi.tuna.tsinghua.edu.cn/simple
2.安装scipy
接下来安装scipy:pip install --index https://pypi.mirrors.ustc.edu.cn/simple/ scipy
直接在在这里在这里插入图片描述
我这里是直接在numpy后面写了scipy忘记删除,但不影响,照样提示安装过了就继续安装scipy了(换色字体是说我pip版本要更新了,但不想更新就没理他)
3.安装matplotlib
输入安装命令:pip install --index https://pypi.mirrors.ustc.edu.cn/simple/ matplotlib
在这里插入图片描述
可看到我输入命令时,matplotlib没有空格隔开,故出现黄色字体,接下来重新输入即成功了。
4.安装sklearn
输入安装命令:pip install --index https://pypi.mirrors.ustc.edu.cn/simple/ sklearn
在这里插入图片描述
我这输入的是sklearn,输入scikit-learn也一样的吧
5.安装cv2
输入安装命令:pip install --index https://pypi.mirrors.ustc.edu.cn/simple/ opencv-python
在这里插入图片描述
可看到我第一下输入的是cv2,明显人家找不到,那就直接输入opencv-python就可以了。
6.安装h5py Pillow
输入安装命令:pip install --index https://pypi.mirrors.ustc.edu.cn/simple/ h5py
pip install --index https://pypi.mirrors.ustc.edu.cn/simple/ Pillow
在这里插入图片描述
7.安装requests psutil
输入安装命令:pip install --index https://pypi.mirrors.ustc.edu.cn/simple/ requests
pip install --index https://pypi.mirrors.ustc.edu.cn/simple/ psutil
在这里插入图片描述
其实也可以直接在后面添加想要的各种包,空格隔开即可,当然保险起见是依次执行咯。

最后在python环境下验证,没得问题。
在这里插入图片描述
参考链接:https://blog.csdn.net/J_TYjushi/article/details/80815874
https://blog.csdn.net/xiaolinger_000/article/details/82318845
使用的书籍《21个项目玩转深度学习》何之源

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值