入手一台神舟战神笔记本,可以和以前的老华硕say goodbye了,希望不要翻船,好好陪我学习哈,至少目前是准备学习用的。深度学习对显卡要求还是有点高,别的笔记本这个价位也买不到好的配置,主要是用它搭建网络,把网络跑通。训练模型嘛还是应该在台式机。下载软件vs,pycharm,opencv,anaconda,配置各种环境,做个记录。(win10 i5 显卡GTX 1650)
1.安装anaconda
下载软件:https://www.anaconda.com/distribution/#download-section
国内镜像源:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
正常双击安装,自己更换安装目录。安装后 遇到的问题如下:
(1)在安装后测试安装终端输入:conda --version
得到的结果:'conda' 不是内部或外部命令,也不是可运行的程序或批处理文件。
这是因为环境变量导致的这个问题。xxx\anaconda\Scripts 目录到刚刚安装的anaconda下的Scripts --version
重新打开终端输入:conda --version 显示(我的是conda 4.8.2) 成功。
(2)安装好以后,为了各个项目不影响等, 我们要建立虚拟环境来进行版本控制。
终端输入:conda create -n name python=3.6.9 自己起名字,然后指定Python版本。
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/win-64/current_repodata.json>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.。。。。。。。。。
这个时候我们要去C:\Users\xx文件夹下找一个叫condarc的文件修改里面的内容。
但是 很多是受里面是没有这个文件的。这时候需要创建condarc文件命令
conda config --add channels r
再去该文件夹下查看.condarc文件已经出现。
复制下方语句到文件内
channels:
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
- http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
show_channel_urls: true
ssl_verify: false
重新按照之前方法创建。
虚拟环境成功。
激活虚拟环境,pip list出现下面的话
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
输入:python -m pip install --upgrade pip 升级pip解决
然后需要啥就自己pip 安装啦,要加源要不然很多都下载不下来 -i https://mirrors.aliyun.com/pypi/simple/
2.下载pycharm
地址:https://www.jetbrains.com/pycharm/download/
下载解压安装
3.安装cuda
cuda_10.0.130_411.31_win10 下载双击安装:https://developer.nvidia.com/cuda-downloads
cudnn-10.0-windows10-x64-v7.6.5.32解压替换:https://developer.nvidia.com/cudnn
上面是空的路径,放到不碍眼的地方。下面是刚刚虚拟环境的python.exe,两个打钩。
(1)阿里云 http://mirrors.aliyun.com/pypi/simple/
(2)豆瓣http://pypi.douban.com/simple/
(3)清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
(4)中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
(5)华中科技大学http://pypi.hustunique.com/
import 一下TensorFlow 睡觉
OK!