Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
DennesTorres
Impactful Individual
Impactful Individual

VS Code and Synapse Kernel

Hi,

I found on the documentation that I should run Fabric notebooks using the Synapse Kernel.

 

However, the Synapse Kernel doesn't appear for me.

DennesTorres_0-1698165045621.png

 

I installed java 1.8 and miniconda, I installed Synapse VS Code Extension (image below), I can see the workspaces and lakehouses, but the kernel is not available to run the notebooks.

What am I missing?

DennesTorres_1-1698165229436.png

 

DennesTorres_2-1698165258440.png



Kind Regards,

 

Dennes

 

 

2 ACCEPTED SOLUTIONS

Hi @DennesTorres ,
Apologies for the delay in response.
Please follow these trouleshooting steps:

  1. Open the VS Code command palette and select/type 'Python: Select Interpreter'

  2. Choose + Enter interpreter path...

  3. Enter Python interpreter path: path\to\envs\${SYNAPSE_CONDA_ENV_NAME}\python

Please refer this link for further details: VS Code
Hope this helps. Please let us know if you have any further questions.

View solution in original post

Hi,

 

It was not straightforward, but I think it worked. I will need to make more tests to confirm.

 

It was difficult to understand the path you asked, but based on the variable, I understand it was something inside the miniconda installation folder.

But there was no python folder there.

Once again, based on the variable, I understand it was related to a folder ENVS, this was present inside the miniconda installation folder, but there was no python folder inside ENVS. There was a folder called synapse-spark-kernel with a python.exe inside it.

I tried this path and received many errors I could not identify. But after closing, opening again and insisting a bit, the synapse-spark-kernel was present in the VS Code.

Thank you!

Kind Regards,

 

Dennes

View solution in original post

14 REPLIES 14
paatrickd
New Member

I have a slightly different problem but related to this topic, so I'll post it here.

 

I did manage to activate the Synapse Kernal in VS Code, however it does not recognize spark. See the code below, spark is of Nonetype.

 

paatrickd_0-1698676976835.png

 

What should I do?

MMBI
Microsoft Employee
Microsoft Employee

Hi @paatrickd , I am also facing the same issue and stuck at the same error where my fabric-synapse-runtime-1-2 kernel is not recognising spark.

Any help/solution that worked for you will be appreciated.

Thanks.

Have you found a solution? I am getting the same error... 

Hi @paatrickd ,
Thanks for using Fabric Community and posting your question.
Can you please create a new post as the initial ask is different from your issue?
We will definitely look into the issue and help.

Thanks for understanding.

v-nikhilan-msft
Community Support
Community Support

Hi @DennesTorres ,
Thanks for using Fabric Community.

While adding the Synapse VS code extension into your Visual Studio, there are some prerequisites which have to be installed in your local desktop. If you install those prerequisites successfully, then extension will auto create the synapse-spark-kernel and install pyspark and other packages. You will able to find this environment after installing all the prerequisites.

Maybe you have installed conda, but forgot to set the environment variable.

While adding the Synapse VS code extension into your Visual Studio, there are some prerequisites which have to be installed in your local desktop. If you install those prerequisites successfully, then extension will auto create the synapse-spark-kernel and install pyspark and other packages. You will able to find this environment after installing all the prerequisites.

Maybe you have installed conda, but forgot to set the environment variable.

vnikhilanmsft_0-1698216019506.png

 

When you activate the extension, it will show the initialization progress and output in output channel like this:

 

 

vnikhilanmsft_1-1698216046261.png

 

 

Please refer this document for installing the prerequisites : Link1
Hope this helps. Please let us know if you have any further queries.

Hi,

I installed the pre-reqs and variables, but I already suspect what could be.

Either it is because I installed the pre-reqs after the extension (I will need to uninstall the extension and install again) or because VS code has a hard time to update the environment variables unless I reboot. When we have 10 different desktops, each one for different purposes and different stuff opened, reboot is not a good thing.

I will try this and give a feedback later.

 

Kind Regards,

 

Dennes

Hi @DennesTorres ,

Thanks for the update. Looking forward for your feedback.
Please let us know if you have any further queries.

I had the same issue. after restarting VSCode, I could see the fabric spark kernel

Hi @DennesTorres ,
We haven’t heard from you on the last response and was just checking back to see if your query has been resolved. Please let us know if you have any further queries.

Hi,

 

All the variables are in place. The requisites are installed.

 

A restart was done. I uninstalled the extension and installed again.

But nothing worked.

 

On the VS Code terminal, when opening a notebook and the Synapse window, the following results appear:

DennesTorres_0-1698500518764.png


The result seems to have no errors, but still the synapse kernel doesn't appear, not allowing the correct notebook execution.

 

DennesTorres_1-1698500961596.png

 

What additional tests could I try ?

 

Kind Regards,

 

Dennes

 

Hi @DennesTorres ,
Apologies for the delay in response.
Please follow these trouleshooting steps:

  1. Open the VS Code command palette and select/type 'Python: Select Interpreter'

  2. Choose + Enter interpreter path...

  3. Enter Python interpreter path: path\to\envs\${SYNAPSE_CONDA_ENV_NAME}\python

Please refer this link for further details: VS Code
Hope this helps. Please let us know if you have any further questions.

Is there an alternate to conda? Given conda comes at a cost.

Hi,

 

It was not straightforward, but I think it worked. I will need to make more tests to confirm.

 

It was difficult to understand the path you asked, but based on the variable, I understand it was something inside the miniconda installation folder.

But there was no python folder there.

Once again, based on the variable, I understand it was related to a folder ENVS, this was present inside the miniconda installation folder, but there was no python folder inside ENVS. There was a folder called synapse-spark-kernel with a python.exe inside it.

I tried this path and received many errors I could not identify. But after closing, opening again and insisting a bit, the synapse-spark-kernel was present in the VS Code.

Thank you!

Kind Regards,

 

Dennes

Hi @DennesTorres ,
Glad that your query got resolved. Please continue using Fabric Community for any help regarding your queries.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.