2

I'm trying to set up VSCode to use the user level installed pylint and pycodestyle so that when using a virtual environment I can keep using linting, without actually having it installed in the environment and appearing in the requirements.txt.

According to pip show these are found in /home/alex/.local/lib/python3.8/site-packages however adding

"python.linting.pycodestylePath": "/home/alex/.local/lib/python3.8/site-packages/pycodestyle",
"python.linting.pylintPath": "/home/alex/.local/lib/python3.8/site-packages/pylint/",

To my user settings.json just results in a invalid path error. I can't figure out what to link to here, none of the obvious options (pep8.py or pycodestle.py in that directory, pylint/lint.py, just the pylint directory itself, etc) work for either of them. Can anyone help? I'm using Ubuntu 18.04 if that makes a difference to where they're located.

4

1 回答 1

2

路径"/home/alex/.local/lib/python3.8/site-packages/是您作为用户安装的 Python 代码所在的位置,而不是pylint命令所"python.linting.pylintPath"希望的位置。你可能想要“/home/alex/.local/bin/pylint`。

于 2020-04-09T21:36:04.317 回答