一不小心装错了keras,导致要重装环境库
参考链接https://mp.weixin.qq.com/s/vhBOrR6uTL2vGXnYC8BS1w
在anaconda中新建环境dlwin362
在cmd中激活环境
activate dlwin362
conda install pygpu==0.6.2 nose
pip install keras==2.0.5
pip install tensorflow-gpu==1.2.0
在anaconda的home下切换到dlwin362环境
点击spyder下面的install
如果出现错误
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.continuum.io/pkgs/free/noarch/repodata.json.bz2><br>Elapsed: -<br><br>An HTTP error occurred when trying to retrieve this URL.<br>HTTP errors are often intermittent, and a simple retry will get you on your way.<br>ConnectTimeout(MaxRetryError("HTTPSConnectionPool(host='repo.continuum.io', port=443): Max retries exceeded with url: /pkgs/free/noarch/repodata.json.bz2 (Caused by ConnectTimeoutError(<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x0000026FC8A82400>, 'Connection to repo.continuum.io timed out. (connect timeout=9.15)'))",),)<br>
表明anaconda使用的镜像网速不行
参考https://www.jianshu.com/p/042fd657e2d4 进行设置
在环境的cmd下输入
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
在目录 C:\Users<你的用户名> 下就会生成配置文件.condarc
用记事本打开,并删除-default所在的行,保存
安装各种需要的库
import cv2对应的是 pip install opencv-python
pip install pandas==0.23.4 (第一次这个版本出问题了,后来重新装又好了)