安装anaconda
创建虚拟环境
1、创建虚拟环境:
conda create -n 环境名 python=版本号
例如创建一个叫做dl的虚拟环境,python版本为3.7:
conda create -n dl python=3.7
2、激活虚拟环境:
conda activate 环境名
3、在虚拟环境中安装ipykernel (切记这一步是在对应的虚拟环境中进行):
pip install ipykernel
使用ipykernel生成虚拟环境的kernel(这一步也是在虚拟环境中进行)
python -m ipykernel install --user --name 环境名
4、配置完成,然后重启或刷新jupyternotebook,点击new即可看到添加的环境
5、删除环境
conda remove -n 环境名 --all
更换镜像源
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
安装常用包(看个人情况)
pip install numpy pandas scipy statsmodels seaborn scikit-learn xgboost lightgbm -i https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
pip install numpy pandas scipy statsmodels matplotlib seaborn datatable bs4 requests selenium lifelines time scikit-learn xgboost lightgbm
pip install numpy -i https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
pip install pandas
pip install scipy
pip install statsmodels
pip install matplotlib
pip install seaborn
pip install datatable
pip install bs4
pip install requests
pip install selenium
pip install lifelines time
pip install scikit-learn
pip install xgboost
pip install lightgbm
pip install tensorflow
pip install pytorch
pip install kears
设置主题(看个人偏好)
pip install jupyterthemes
jt -t grade3 -f fira -fs 13 -cellw 90% -ofs 11 -dfs 11 -T -N
jt -t oceans16 -f fira -fs 13 -cellw 90% -ofs 11 -dfs 11 -T -N
jt -t grade3 -f fira -fs 13 -cellw 85% -ofs 11 -dfs 11 -T
jt -t solarizedl -f fira -fs 13 -cellw 85% -ofs 11 -dfs 11 -T
jt -t grade3 -f Consolas -nf robotosans -tf robotosans -N -T -cellw 80% -dfs 9 -ofs 9
jt -t grade3 -f consolamono -fs 13 -nf robotosans -tf robotosans -N -T -cellw 85% -dfs 11 -ofs 9
jt -t monokai -f hack -fs 13 -nf robotosans -tf robotosans -N -T -cellw 85% -dfs 11 -ofs 13
jt -t grade3 -f mononoki -fs 13 -nf robotosans -tf robotosans -N -T -cellw 85% -dfs 11 -ofs 13
jt -t grade3 -f hack -fs 13 -nf robotosans -tf robotosans -N -T -cellw 85% -dfs 11 -ofs 13
主题:grade3 monokai
字体:hack,Consolas,mononoki