如果想搭建GPU版本,同理。
anaconda + pytorch 环境搭建连接
win10下深度学习环境搭建tensorflow + pytorch框架
参考上面两篇教程做总结一下注意事项:
注意1. 创建python3.6环境
(由于anaconda 中的python版本是3.7版本,和tensorflow版本有些不兼容,因此需要在anaconda中搭建一个python3.6版本)
conda create -n Deeplearning python=3.6
注意2. tensorflow镜像安装
可直接用清华镜像源命令:
pip install tensorflow==2.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
其中版本2.0可自行修改
如果出现以下问题:
Could not fetch URL https://pypi.org/simple/tqdm/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.org’, port=443): Max retries exceeded with url: /simple/tqdm/ (Caused by SSLError(SSLEOFError(8, ‘EOF occurred in violation of protocol (_ssl.c:852)’),)) - skipping
那么:
pip install package_name -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Tensorflow版本与keras版本对应
注意3. 如果要用keras的话,tensorflow1.14对应keras 2.3.1
pip install tensorflow==1.14 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install -i https://pypi.douban.com/simple keras==2.3.1
#其他常用包安装
pip install -i https://pypi.douban.com/simple scikit-learn
pip install -i https://pypi.douban.com/simple lightgbm
pip install -i https://pypi.douban.com/simple pandas
pip install -i https://pypi.douban.com/simple tqdm
pip install -i https://pypi.douban.com/simple jupyter notebook
pip install -i https://pypi.douban.com/simple matplotlib
#镜像后面加不加反斜杠抖可以
pip install -i https://pypi.douban.com/simple/ matplotlib
#读取excel,最新的读不了
pip install -i https://pypi.douban.com/simple xlrd==1.2.0