搭建python运行环境

一、下载Anaconda

Anaconda是Python的包管理器和环境管理器
https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
参考:https://cloud.tencent.com/developer/article/1406417

二、配置IDE

(1)vscode

1.安装python插件
2.安装汉化插件
3.安装flake8和yapf
flake8会检查编写代码时的不规范的地方和语法错误。
yapf是一个代码格式化工具,可以一键美化代码。(ALT+Shift+F)
4.在settings.json中
配置flake8和yapf并关闭pylint工具。
在工作区域输入以下内容:
{
"python.linting.flake8Enabled": true,
"python.formatting.provider": "yapf",
"python.linting.flake8Args": ["--max-line-length=248"],
"python.linting.pylintEnabled": false
}

(2)spyder

1.设置文本字体大小
2.代码高亮
3.代码自动填充(Tab键配合)
4.ctrl+1注释
5.参考:https://blog.csdn.net/qq_33793599/article/details/81359947

猜你喜欢

转载自www.cnblogs.com/dmir/p/12320912.html
今日推荐