0

Very frustrated*. Code works on jupyter lab, but not in Visual Studio Code.

I’ve created clean new environments, installed, removed, reinstalled [hours gone-by]. i’ve installed as per instructions (in clean environments) [eg., conda install -c pyviz/label/dev holoviews]

here the versions i’m using

hvplot.version = ‘0.6.0’
holoviews.version =‘1.13.3’
pd.version = ‘1.0.5’

i have the following simple code… from one of your tutorials

'''

import hvplot.pandas  # noqa

from bokeh.sampledata.iris import flowers
import hvplot

#%%

flowers.hvplot.plot(x=‘sepal_width’, y=‘sepal_length’, width=600, groupby=‘species’, kind=‘scatter’ )

'''

this is what i managed to capture in a debugger

SyntaxError: Unexpected token ‘?’
    at runCodeHere (vscode-resource://file///c%3A/Users/cg/.vscode/extensions/ms-python.python-2020.6.91350/out/datascience-ui/notebook/vendors~nteract_transforms.bundle.js:2:11588)
    at t.value (vscode-resource://file///c%3A/Users/cg/.vscode/extensions/ms-python.python-2020.6.91350/out/datascience-ui/notebook/vendors~nteract_transforms.bundle.js:2:12015)
    at Ta (vscode-resource://file///c%3A/Users/cg/.vscode/extensions/ms-python.python-2020.6.91350/out/datascience-ui/notebook/commons.initial.bundle.js:2:2379474)
    at Pa (vscode-resource://file///c%3A/Users/cg/.vscode/extensions/ms-python.python-2020.6.91350/out/datascience-ui/notebook/commons.initial.bundle.js:2:2382396)
    at vscode-resource://file///c%3A/Users/cg/.vscode/extensions/ms-python.python-2020.6.91350/out/datascience-ui/notebook/commons.initial.bundle.js:2:2395476
    at Object.t.unstable_runWithPriority (vscode-resource://file///c%3A/Users/cg/.vscode/extensions/ms-python.python-2020.6.91350/out/datascience-ui/notebook/commons.initial.bundle.js:2:25151)
    at Ms (vscode-resource://file///c%3A/Users/cg/.vscode/extensions/ms-python.python-2020.6.91350/out/datascience-ui/notebook/commons.initial.bundle.js:2:2395410)
    at xs (vscode-resource://file///c%3A/Users/cg/.vscode/extensions/ms-python.python-2020.6.91350/out/datascience-ui/notebook/commons.initial.bundle.js:2:2395186)
    at Es (vscode-resource://file///c%3A/Users/cg/.vscode/extensions/ms-python.python-2020.6.91350/out/datascience-ui/notebook/commons.initial.bundle.js:2:2394531)
    at ms (vscode-resource://file///c%3A/Users/cg/.vscode/extensions/ms-python.python-2020.6.91350/out/datascience-ui/notebook/commons.initial.bundle.js:2:2393552)

output

User belongs to experiment group ‘ShowPlayIcon - start’

User belongs to experiment group ‘ShowExtensionSurveyPrompt - enabled’

User belongs to experiment group ‘DebugAdapterFactory - experiment’

User belongs to experiment group ‘PtvsdWheels37 - experiment’

User belongs to experiment group ‘UseTerminalToGetActivatedEnvVars - control’

User belongs to experiment group ‘LocalZMQKernel - control’

User belongs to experiment group ‘CollectLSRequestTiming - control’

User belongs to experiment group ‘CollectNodeLSRequestTiming - experiment’

User belongs to experiment group ‘EnableIPyWidgets - experiment’

User belongs to experiment group ‘DeprecatePythonPath - control’

User belongs to experiment group ‘RunByLine - control’

User belongs to experiment group ‘CustomEditorSupport - control’

conda --version

pyenv root

python3.7 c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py -c “import sys;print(sys.executable)”

python3.6 c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py -c “import sys;print(sys.executable)”

python3 c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py -c “import sys;print(sys.executable)”

python2 c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py -c “import sys;print(sys.executable)”

python c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py -c “import sys;print(sys.executable)”

py -3.7 c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py -c “import sys;print(sys.executable)”

py -3.6 c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py -c “import sys;print(sys.executable)”

py -3 c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py -c “import sys;print(sys.executable)”

py -2 c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py -c “import sys;print(sys.executable)”

~\anaconda3\envs\viz2\python.exe c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py -c “import sys;print(sys.executable)”

Python interpreter path: ~\anaconda3\envs\viz2\python.exe

Starting Microsoft Python language server.

~\miniconda3\Scripts\conda.exe info --json

~\miniconda3\Scripts\conda.exe info --json

~\miniconda3\Scripts\conda.exe env list

~\miniconda3\Scripts\conda.exe info --json

~\Anaconda3\python.exe c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py -c “import jupyter”

~\Anaconda3\python.exe c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py -c “import notebook”

~\Anaconda3\python.exe c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py jupyter kernelspec --version

~\Anaconda3\python.exe c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v

~\Anaconda3\python.exe c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v

~\Anaconda3\python.exe c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v

~\Anaconda3\python.exe (daemon) -m jupyter notebook --no-browser --notebook-dir=C:\Users\cg\AppData\Local\Temp\26614261-c8ea-450c-9926-d75a7af2814a --config=C:\Users\cg\AppData\Local\Temp\26614261-c8ea-450c-9926-d75a7af2814a\jupyter_notebook_config.py --NotebookApp.iopub_data_rate_limit=10000000000.0

~\Anaconda3\python.exe (daemon) -m jupyter kernelspec list --json

~\Anaconda3\python.exe (daemon) -m jupyter kernelspec list --json

~\miniconda3\Scripts\conda.exe env list

~\Anaconda3\python.exe (daemon) c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\vscode_datascience_helpers\getJupyterKernels.py

~\Anaconda3\python.exe (daemon) c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\vscode_datascience_helpers\getJupyterKernels.py

~\Anaconda3\python.exe (daemon) c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\vscode_datascience_helpers\getServerInfo.py

~\Anaconda3\python.exe (daemon) c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\vscode_datascience_helpers\getServerInfo.py

~\Anaconda3\python.exe (daemon) c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\vscode_datascience_helpers\getServerInfo.py

~\Anaconda3\python.exe (daemon) c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\vscode_datascience_helpers\getServerInfo.py

~\anaconda3\envs\viz2\python.exe c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\normalizeForInterpreter.py “import bokeh, holoviews as hv # noqa”

~\anaconda3\envs\viz2\python.exe c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\normalizeForInterpreter.py “import panel as pn”

~\anaconda3\envs\viz2\python.exe c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\normalizeForInterpreter.py “from bokeh.sampledata.iris import flowers”

~\anaconda3\envs\viz2\python.exe c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\normalizeForInterpreter.py “import hvplot.streamz # noqa”

~\anaconda3\envs\viz2\python.exe c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\normalizeForInterpreter.py “import hvplot.pandas # noqa”

~\anaconda3\envs\viz2\python.exe c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\pyvsc-run-isolated.py c:\Users\cg.vscode\extensions\ms-python.python-2020.6.91350\pythonFiles\normalizeForInterpreter.py "flowers.hvplot.bivariate(x=‘sepal_width’, y=‘sepal_length’, width=600, groupby='species')" ~\miniconda3\Scripts\conda.exe info --json

1 Answers1

0

From that sample code, I got it to work by doing this:

hvplot.plot(flowers, x="sepal_width", y="sepal_length", width=600, groupby="species", kind="scatter" )
R Chiodo
  • 494
  • 2
  • 6