windows下,直接在user目录中创建一个pip目录,如:C:\Users\xx\pip,新建文件pip.ini,内容如下
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = mirrors.aliyun.com
python -m pip install -upgrade pip #先更新pip
pip install SomePackage
pip uninstall packageName
pip install flake8 #安装flake8之后写代码的时候编辑器就会提示哪里出错,代码格式不规范也会提示
pip install yapf #安装yapf之后在VScode中按Alt+Shift+F即可自动格式化代码
pip install pylint
Chinese (Simplified) Language Pack for Visual Studio Code
Python
Code Runner
Markdown All in One
Markdown Preview Enhanced
Markdown Theme Kit
{
"editor.fontSize": 18,
"editor.fontFamily": "YaHei Consolas Hybrid",
"markdown.preview.fontSize": 18,
"markdown.preview.fontFamily": "YaHei Consolas Hybrid",
"terminal.integrated.fontSize": 18,
"python.formatting.provider": "yapf",
"python.linting.flake8Enabled": true
}