vscode之python解释器和波浪线处理

6,343次阅读
没有评论

共计 1308 个字符,预计需要花费 4 分钟才能阅读完成。

Select an Interpreter

The extension now exposes a command that will display a list of known (automatically discovered) interpreters. Selecting an item from this interpreter will automatically configure your workspace settings file settings.json to make use of this interpreter.
This now frees you from having to manually open the settings.json file and make the necessary changes.

How are the interpreters discovered?

  • Standard paths such as /usr/local/bin, /usr/sbin, /sbin, C:\\Python2.7, etc. will be searched for interpreters
  • Virtual environments located under the workspace (project) directory will be searched
  • Conda environments will be listed

How to use this feature?

  • Select the command Python: Select Workspace Interpreter from the [command palette](https://code.visualstudio.com/docs/editor/codebasics#_command-palette)
  • Upon selecting the above command a list of discovered interpreters will be displayed in a quick pick list
  • Selecting an interpreter from this list will update the settings.json file automatically.

Interpreter is not listed

If the interpreter you are looking for is not listed here, then please enter is manually using the instructions found here.

vscode之python解释器和波浪线处理vscode之python解释器和波浪线处理


pylint问题

vscode中Python linter采用的pylint,不知道是默认的,还是我装了某些插件之后自动帮我改了。pylint有个问题是,警告特别多!一条条的绿色波浪线,对于一个强迫症患者来说,这很难忍,况且它还是绿色的!

vscode之python解释器和波浪线处理

根据它给出的警告提示,我去搜了一下,然后在stackoverflow找到一个解决方法,如下图:

vscode之python解释器和波浪线处理

如果上述在运行pylint –generate-rcfile >~/.pylintrc 失败就直接去~下面查看是否存在这个文件,存在直接修改就好了

根据这里面说的,我去设置了一下,并重启了vscode,然后所有的绿色波浪线就都没了,顿时清爽了。

正文完
请博主喝杯咖啡吧!
post-qrcode
 
admin
版权声明:本站原创文章,由 admin 2017-07-08发表,共计1308字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
评论(没有评论)
验证码