您当前的位置: 首页 >  Python
  • 5浏览

    0关注

    477博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

vscode没法选python解释器interpreter

高精度计算机视觉 发布时间:2021-12-05 01:11:28 ,浏览量:5

问题比较复杂,尝试以下方案, (1)这个错误是由配置引起的,关闭vscode, ctrl+H 显示配置文件,在/home/user/.config下,删除这个文件夹(里面包含错误的配置), /home/user/.config/code 然后就可以正常配置vscode了。 (2)在launch.json中直接添加路径,

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [    
        {
            "name": "Python: 当前文件",
            "type": "python",
            "request": "launch",
            "program": "${file}",
            "console": "integratedTerminal",
            "python": "/home/user/anaconda3/envs/torch/bin/python",
            "justMyCode": false
        }
    ]
}

(3) 修改inheritEnv设置 vscode有时会提示这么个东东, 在这里插入图片描述 在GUI中配置, 在这里插入图片描述 或者,在settings.json中配置 “terminal.integrated.inheritEnv”: false,

关注
打赏
1659856567
查看更多评论
立即登录/注册

微信扫码登录

0.1171s