I built my new pc last month and walked through the tedious installation process for future machine learning usage.
Here are some reusable snippets just in case I forgot.
My wares
hardware
- Intel 10900k
- RTX 2070s Colorful Adoc
- ASUS Z490 edge wifi version
- 3600mhz 32G RAM
software
- win10 professional version
- efficiency tools
- listary
- chrome
- toby
conda
- download anaconda
- invoke anaconda prompt
- create env
conda create --name wow
conda create --name wow python=3.7.3
- list env
conda env list
- activate env
conda activate wow
- list env packages
conda list
- clone an env
conda create --name copy --clone wow
- remove an env
conda env remove --name copy
add conda to path
- in cmd,
where conda
- add three paths to system environment variable PATH
- 1
- 2
- 3
change mirror
find .condarc
file under your user folder, replace the content with
1 | channels: |
If you need to restore to the default settings, just delete all the lines after show_channel_urls line or you can use conda config --remove-key channels
pip
conda install pip
change mirror
- (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/
1
2pip install pip -U
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple- (1)阿里云 http://mirrors.aliyun.com/pypi/simple/
search for a package
pip search keras
prepare ml+dl env
install packages
1 | pip install pandas scikit-learn seaborn tqdm |
the latest tf2 supports both gpu and cpu.
https://www.tensorflow.org/install
install cuda
You should check the pytorch page for cuda version or it can’t detect your gpu properly.
Till now, the latest cuda version you could use is CUDA10.02.
You can find all cuda versions here.
The difference between CUDA and cuDNN:
which cnDNN should you install
just use pip install cudnn
and it will automatically choose the right version of cudnn for your cuda version.