我知道这个问题有多个版本,所以,我尝试过在这些线程上发布的解决方案,它们似乎没有帮助:
我在Ubuntu中安装了VS代码。我似乎不能让蟒蛇开始工作了。也就是说,我收到一条消息说
Linter pylint is not installed 我很确定VM上安装了pylint,因为当我运行which pylint时,我有一个有价值的输出。
以下是which python和which pylint的输出
/usr/bin/python
/home/rakshak/.local/bin/pylint在VS代码中的用户设置和工作区设置中有以下内容
// Place your settings in this file to overwrite the default settings
{
"python.linting.pylintEnabled": true,
"python.linting.pylintPath": "/home/rakshak/.local/bin/pylint",
"python.pythonPath": "/usr/bin/python"
}发布于 2018-10-01 02:40:57
所以,原来这只是一个权限问题!
当我收到pylint not installed消息时,我收到了一个按钮来“安装pylint”,这个按钮运行
sudo pip安装pylint
这使我的.local/lib/的所有者变成了root用户,并且使vscode无法访问它。
ls -ld ~/.local/lib/产量
drwx-9月24日10:49 /home/userName/..local/lib/
运行chown与我的组和用户修复了这个问题。
sudo组:user~/..local
现在,ls -ld ~/.local/lib/的输出读取
drwx
发布于 2018-09-28 11:38:06
您是否检查过已安装了哪个python版本?如果您使用了python 3.6,那么设置必须如下所示:
"python.pythonPath": "/usr/bin/python3.6"
https://stackoverflow.com/questions/52472287
复制相似问题