【问题标题】:Unable to change kernel to Python in Azure Data Studio无法在 Azure Data Studio 中将内核更改为 Python
【发布时间】:2022-08-03 13:36:41
【问题描述】:

我尝试将 Azure Data Studio 内核更改为 Python 3,但没有成功(PySpark 也不起作用)。错误信息是:

Failed to change kernel. Kernel SQL will be used. Error was: request to http://localhost:8888/api/sessions?1658840691943 failed, reason: connect ECONNREFUSED 127.0.0.1:8888

同时我仍然可以毫无问题地单独运行笔记本。提到了一些用于检查要添加到 PATH 的 Python 的来源,我做了并看到它被添加了。如果我在 cmd 中输入:

python --version

它返回了Python 3.8.8 我还可以通过这个 cmd 条目找到位置:

where python

这给了C:\\ProgramData\\Anaconda3\\python.exe

你能告诉什么可以解决这个问题吗?

    标签: python azure kernel azure-data-studio


    【解决方案1】:

    我遇到了同样的问题,并从Failed to change kernel due to error 找到了答案。您收到此消息的原因之一是权限。以下是为我制定的步骤。

    1. 将您的 python 更新到最新版本。
    2. 在用户文件夹而不是系统文件夹中运行您的 python 环境。
    3. 确保 Anaconda 附加到用户目录中的 python 而不是系统目录中。

    【讨论】:

      猜你喜欢
      • 2016-04-08
      • 1970-01-01
      • 1970-01-01
      • 2023-01-23
      • 1970-01-01
      • 2018-08-31
      • 2023-01-19
      • 2019-05-20
      • 2020-02-29
      相关资源
      最近更新 更多