How to run qiime2 using jupyter notebook in visual studio code?

Hello
I am totally new to python and qiime 2. I am using this on Mac OS monterey 12.6. I downloaded qiime 2 and its command line interface worked successfully.


My question is about API interface for qiime 2 about which it is said that:
" It has been optimized for use in the Jupyter Notebook, which is currently our primary target for use of this API."
My question is that can i use this specific interface of qiime 2 on jupyter noteook on visual studio code? Because there is jupyter extension available in visual studio code. If it is possible then can someone please tell me how to start running qiime code on it?
I hope i was able to explain my question as i am totally new to qiime2 and python language.
Regards
Hira

1 Like

Hi @Hira_Hira,

You certainly can, the only real limitation here is you won't be able to view visualizations automatically inline, instead you'll see this message:

Which isn't an issue, but following those instructions won't really solve anything as the extension doesn't work with VSCode.

Otherwise, the QIIME 2 Python API doesn't care how you execute it. All you need to do is select a QIIME 2 environment when picking your kernel (vscode should prompt you for this).

If you don't see the environment, then try installing jupyter notebook in that environment and try again (conda install -c conda-forge notebook).

2 Likes

Thank you, this saved me a lot of time figuring out why in-line visualizations are not possible in VSCode.

But I don't give up on VSCode yet. There is a simple workaround that opens a browser tab from VSCode, and where you can see the .qzv even if you are offline :smiley:
Run this in your IDE (Jupyter/VSCode/...)

!qiime tools view 'image.qzv'
2 Likes

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.