python - 无法在 Azure Data Studio 中将内核更改为 Python

标签 python azure kernel azure-data-studio

我尝试将 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

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

python --version

它返回了Python 3.8.8 我还可以使用此 cmd 条目找到该位置:

where python

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

你能告诉我什么是解决这个问题的方法吗?

最佳答案

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

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

关于python - 无法在 Azure Data Studio 中将内核更改为 Python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73124112/

相关文章:

Python 样条曲线或其他在 x 轴上随时间变化的插值?

c# - 在我的逻辑应用程序的 azure 函数中将电子邮件正文转换为 JSON 对象

linux - 如何从外部模块导出符号?

带有边框的 Python Jupyter Notebook 样式数据框

python - IPython 无法识别更新的模块

python - 使用 Python 对以元组为元素的列表进行排序

linux - 进程(任务)的 CPU 使用率 Linux 内核

azure - 事件总线和大数据最佳实践

azure - 通过 CLI 登录 CI/CD

linux - 如何使用预构建的内核输出目录构建 linux 内核模块?