我尝试将 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 找到了答案。您收到此消息的原因之一是权限问题。以下是对我来说有效的步骤。
- 将您的 Python 更新到最新版本。
- 在用户文件夹而不是系统文件夹中运行 python 环境。
- 确保 Anaconda 附加到用户目录中的 python,而不是系统目录。
关于python - 无法在 Azure Data Studio 中将内核更改为 Python,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73124112/