Glue PySpark kernel not showing in VS Code

huangapple go评论57阅读模式
英文:

Glue PySpark kernel not showing in VS Code

问题

我有一个Window 10 VDI,并使用此链接设置了AWS Glue交互式会话。 用于此设置的Python版本是Python 3.9.7。

当我从命令提示符启动笔记本时,在浏览器中看到各种内核。

我有VSCode(已更新到v1.77),并安装了Python和Jupyter扩展,尝试使用这个设置VSCode以使用Glue交互式会话。

在VSCode中,我没有看到Glue PySpark作为内核选项,尽管看到了Glue Spark。我还根据这里的描述添加了Python路径到kernel.json。

但是我仍然在VSCode中看不到Glue PySpark作为选项。我是否遗漏了任何设置?

英文:

I have a Window 10 VDI and have set-up AWS Glue Interactive session using this link. Python version set-up for this is Python 3.9.7

When I start the notebook from command prompt, I see the various kernels in the browser

Glue PySpark kernel not showing in VS Code

I have VSCode ( updated to v1.77 ) and have installed the Python and Jupyter extensions as well and trying to set-up VSCode to use the Glue Interactive sessions using this .

In VSCode, I do not see Glue PySpark as kernel Option, though see Glue Spark. I have also added python path the kernel.json as described here

But I still do not see Glue PySpark as an option in VSCode. Am I missing any set-up ?

Glue PySpark kernel not showing in VS Code

答案1

得分: 0

我通过添加以下链接Pyspark Kernel not showing中找到的信息来解决了我的问题。

{
"argv": [
"D:\venvs3\.venv\Scripts\python.exe", <-- venv中python的完整路径
"-m",
"aws_glue_interactive_sessions_kernel.glue_pyspark.GlueKernel",
"-f",
"{connection_file}"
],
"display_name": "PySpark",
"language": "python"
}

我也尝试了几次卸载和重新安装设置,但不确定是否有所不同。我提到这一点的唯一原因是 - 在这个过程中,我更改了一些软件包的不同版本,并安装了一些作为--user,因为否则我会遇到权限问题。

这可能与它开始工作是否有关,但kernel.json的上述更新绝对是必需的。

英文:

I was able to resolve my issue by adding the below information found at the link Pyspark Kernel not showing

{
  &quot;argv&quot;: [
    &quot;D:\\venvs3\\.venv\\Scripts\\python.exe&quot;, &lt;-- Full path to python from venv 
    &quot;-m&quot;,
    &quot;aws_glue_interactive_sessions_kernel.glue_pyspark.GlueKernel&quot;,
    &quot;-f&quot;,
    &quot;{connection_file}&quot;
  ],
  &quot;display_name&quot;: &quot;PySpark&quot;,
  &quot;language&quot;: &quot;python&quot;
}

I also uninstalled and reinstalled the set-up a few times as trial and error, but don't know if that made any difference. The only reason I am mentioning it here is - during that process I changed different versions for packages and also installing some of them as --user as I was getting permissions issues otherwise.

That may or may not have anything to do with why it started working, but the above update to kernel.json is definitely needed.

答案2

得分: 0

"Along with the above mentioned changes, I also had to change the language to 'scala' which does not make sense but helped to get Glue PySpark in VSCode.
"language": "scala""

英文:

Along with the above mentioned changed, I also had to change the language to "scala" which does not make sense but helped to get Glue PySpark in VSCode.
&quot;language&quot;: &quot;scala&quot;

huangapple
  • 本文由 发表于 2023年4月10日 19:46:22
  • 转载请务必保留本文链接:https://go.coder-hub.com/75976820.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定