1.安装anaconda,用清华源,自带python 3.6。
2.安装opencv,直接打开conda prompt,pip install xx,检验import cv2。
pip install opencv-contrib-python==3.4.3.18
3.安装pytorch。
****用管理员权限打开conda prompt
首先,conda改清华镜像源。
然后在用户名>某个类似.conda文件中记事本打开,删除里面defualt字样。
最后conda install xxx就可以了
4安装TensorFlow
先安装visual studio 2015,只选c++
改清华源:https://blog.csdn.net/qq_44722174/article/details/104800082?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param
再安装opencv
再安装pip install --upgrade tensorflow-gpu==1.10.0
conda list查看numpy版本,安装:pip install numpy==1.14.0
验证tensorflow看看有没有报错:import tensorflow
看版本pip show tensorflow-gpu
其中,安装pyorch:conda install pytorch torchvision cudatoolkit=9.0
pytorch参考:https://blog.csdn.net/qq_44722174/article/details/104800082?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param
参考https://blog.csdn.net/weixin_39121325/article/details/90035155
参考文章:https://www.cnblogs.com/zhouzhiyao/p/11784055.html
https://blog.csdn.net/qq_44722174/article/details/104800082?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param
安装cuda和cudnn:
https://blog.csdn.net/sinat_23619409/article/details/84202651
cuda环境变量:
https://blog.csdn.net/qy2517/article/details/88405999
在jupyter notebook中使用虚拟环境
1.启动虚拟环境
2.转换路径cd/d到requirements.txt文件所在位置
txt文件及教程下载:链接:https://pan.baidu.com/s/1dSqhFtbb0xYw_SpISOCnPg
提取码:sv2e
3.pip install -r requirements.txt
第3步已经安装好了ipykernel
4.添加 –当前环境 – 到ipykernel:
python -m ipykernel install --user --name=Hpy36
安装kera
pip install keras==2.2 -i https://pypi.douban.com/simple