Running shiny python with VScode: wrong interpreter

I'm trying to get started with Shiny for Python but I'm struggling with the VScode extension. It worked straight away on another computer earlier, presumably because it only had fewer Python environments, but I can't get it to work here.

I'm following the steps in the installation docs:

mkdir myapp
cd myapp

python3 -m venv venv

source venv/bin/activate

pip install --upgrade pip wheel

pip install shiny

shiny create .

shiny run --reload

All good so far. Now, with VScode, if I click the run button, I get an error:

(venv) (base) baptiste@Baptistes-MBP-3 Bapp % /usr/bin/python3 -m shiny run --port 59389 --reload "/Users/baptiste/Documents/my_app/"
/Applications/ No module named shiny

Any idea where I can configure it to use the local venv and the corresponding python interpreter?

I am getting the same error i am not sure how to set my interpreter,

there was option to use my conda interpreter but getting this error

C:\Users\ijaz\anaconda3\python.exe: No module named shiny
PS C:\Users\ijaz\Desktop\Shinny Project> conda activate base
conda : The term 'conda' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1

  • conda activate base
  •   + CategoryInfo          : ObjectNotFound: (conda:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException

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

If you have a query related to it or one of the replies, start a new topic and refer back with a link.