安装pip和pylint

mac默认是不带pip,安装pip的方式:

sudo easy_install pip 

 

参考: http://huberyhe.github.io/2017/07/05/vscode-Linter-pylint-is-not-installed/ 

1.打开终端(Ctrl+~)
2.安装pylint:sudo -H pip install pylint
3.如果已经安装或者安装之后无效,是因为vscode默认的python目录和系统使用的python目录不一致,我的是升级安装到/usr/local/python2.7.12目录下的。
4.打开vscode设置File->Preference->Settings(Ctrl+,)
5.定位到Python Configuration
6.找到以下两个项目,Copy to Settings

1
2
"python.linting.pylintPath": "pylint",
"python.pythonPath": "python"

 

7.在USER SETTINGS中将这两个项目设置到正确的路径

1
2
"python.linting.pylintPath": "/usr/local/python2.7.12/bin/pylint",
"python.pythonPath": "/usr/local/python2.7.12/bin/python"

 

8.或者你想把linting功能(错误检查)关掉

 

1
"python.linting.pylintEnabled": false
posted @ 2017-12-27 17:54  rrranmo  阅读(5446)  评论(0编辑  收藏  举报