![](/img/trans.png)
[英]Visual Studio code with PyLint and autoPep8: How can I avoid PyLint to complain about my line length?
[英]How do I configure Visual Studio Code with Python extension to not complain about inability to import modules?
我是VS Code的新手,我為我用Python編寫的教程項目安裝了PySide。 我試着:
from PySide.QtGui import QDialog, QApplication, QVBoxLayout, QLineEdit, QTextBrowser
from PySide.QtCore import *
雖然代碼使用導入的模塊運行得非常好,但VS Code抱怨:
[pylint] E0401:Unable to import 'PySide.QtGui'
要么
[pylint] E0401:Unable to import 'PySide.QtCore'
這非常令人惱火,因為我可以按預期使用模塊。 我猜是配置問題,但不知道如何解決這個問題。
非常感謝你。
也可以看看:
編輯:
我使用PySide的預編譯版本。 這可能是這種行為的原因嗎?
使用Visual Studio Code的更新1.6和相應的Python擴展,問題不再出現。
確保您已在環境中安裝了pylint(虛擬環境以防萬一)
pip install pylint
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.