• 为了保证你在浏览本网站时有着更好的体验,建议使用类似Chrome、Firefox之类的浏览器~~
    • 如果你喜欢本站的内容何不Ctrl+D收藏一下呢,与大家一起分享各种编程知识~
    • 本网站研究机器学习、计算机视觉、模式识别~当然不局限于此,生命在于折腾,何不年轻时多折腾一下

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

Python admin 2年前 (2017-07-08) 1865次浏览 0个评论 扫描二维码

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.

Select InterpreterSelect Interpreter


pylint 问题

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

这里写图片描述

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

这里写图片描述

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

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


Deeplearn, 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明vscode 之 python 解释器和波浪线处理
喜欢 (0)
admin
关于作者:

您必须 登录 才能发表评论!