microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.29k stars 291 forks source link

issues with vscode-jupyter when it's installed via flatpak #6362

Closed ghost closed 3 years ago

ghost commented 3 years ago

Environment data

Expected behaviour

Jupyter will use system's python interpreter and libaries

Actual behaviour

Jupyter uses python that is shipped with flatpak, it's impossible to change it

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. Install VS code via flatpak
  2. Install jupter and python extension
  3. add those lines to settings.json
    "terminal.integrated.defaultProfile.linux": "zsh",
    "terminal.integrated.profiles.linux": {
        "zsh": {
          "path": "/usr/bin/env",
          "args": ["--", "flatpak-spawn", "--host", "--env=TERM=xterm-256color", "zsh"]
        }},
    "python.defaultInterpreterPath": "/usr/bin/python",
  4. open file and try to run it image

when executing normal python code it works properly - it uses system's python

but when i try to do that with jupyter it doesn't work so i suspect that it's issue on vsc-jupyter side

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter) User belongs to experiment group 'pythonJediLSP' User belongs to experiment group 'jupyterTest' User belongs to experiment group 'pythonDiscoveryModuleWithoutWatcher' User belongs to experiment group 'pythonSurveyNotificationcf' User belongs to experiment group 'jupyterEnhancedDataViewer' Info 2021-06-23 20:12:50: ZMQ install verified. Info 2021-06-23 20:12:50: id is 97f7d499-f622-442c-ac63-e8594cbd7754 Info 2021-06-23 20:12:50: Loading web panel for file:///home/pnogas/Code/notebooks/avocado.ipynb Info 2021-06-23 20:12:50: Loading webview. View is notset Info 2021-06-23 20:12:50: Attempting to start a server because of preload conditions ... Info 2021-06-23 20:12:50: Loading web view... Info 2021-06-23 20:12:50: Webview panel created. Info 2021-06-23 20:12:51: Creating raw notebook for file:///home/pnogas/Code/notebooks/avocado.ipynb Info 2021-06-23 20:12:51: Getting preferred kernel for file:///home/pnogas/Code/notebooks/avocado.ipynb Info 2021-06-23 20:12:51: initialize CommonMessageCoordinator Info 2021-06-23 20:12:52: Search all interpreters /bin/python, /sbin/python, /usr/bin/python, /usr/sbin/python Info 2021-06-23 20:12:52: Cached data exists getEnvironmentVariables, Info 2021-06-23 20:12:52: Cached data exists getEnvironmentVariables, Info 2021-06-23 20:12:52: Cached data exists getEnvironmentVariables, Info 2021-06-23 20:12:52: Cached data exists getEnvironmentVariables, Info 2021-06-23 20:12:52: Loading kernelspec from /home/pnogas/.local/share/jupyter/kernels/python3/kernel.json for undefined Info 2021-06-23 20:12:52: Process Execution: > /usr/bin/python -c "import ipykernel" > /usr/bin/python -c "import ipykernel" Info 2021-06-23 20:12:52: Process Execution: > /usr/bin/python -c "import ipykernel" > /usr/bin/python -c "import ipykernel" Info 2021-06-23 20:12:52: Process Execution: > /usr/bin/python -m pip list > /usr/bin/python -m pip list Info 2021-06-23 20:12:52: Process Execution: > /usr/bin/python -m pip list > /usr/bin/python -m pip list Info 2021-06-23 20:12:52: Process Execution: > /usr/bin/python -c "import jupyter" > /usr/bin/python -c "import jupyter" Info 2021-06-23 20:12:52: Process Execution: > /usr/bin/python -c "import jupyter" > /usr/bin/python -c "import jupyter" Info 2021-06-23 20:12:52: Process Execution: > /usr/bin/python -c "import notebook" > /usr/bin/python -c "import notebook" Info 2021-06-23 20:12:52: Process Execution: > /usr/bin/python -c "import notebook" > /usr/bin/python -c "import notebook" Info 2021-06-23 20:12:52: Hiding default kernel spec Python 3, python Info 2021-06-23 20:12:52: findPreferredKernel score for Python3, Python 3.8.8 64-bit is 4 Info 2021-06-23 20:12:52: findPreferredKernel score for Python 3.8.8 64-bit is 4 Info 2021-06-23 20:12:52: findPreferredKernel score for Python3, Python 3.8.8 64-bit is 4 Info 2021-06-23 20:12:52: findPreferredKernel score for Python 3.8.8 64-bit is 4 Info 2021-06-23 20:12:52: findPreferredKernel score for Python3, Python 3.8.8 64-bit is 104 Info 2021-06-23 20:12:52: findPreferredKernel score for Python 3.8.8 64-bit is 104 Info 2021-06-23 20:12:52: findPreferredKernel score for Python3, Python 3.8.8 64-bit is 4 Info 2021-06-23 20:12:52: findPreferredKernel score for Python 3.8.8 64-bit is 4 Info 2021-06-23 20:12:52: findKernel found Python 3.8.8 64-bit Info 2021-06-23 20:12:52: Find kernel spec, Class name = T, completed in 1742ms, has a truthy return value, Arg 1: , Arg 2: {"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.9.5"},"orig_nbformat":4,"kernelspec":{"name":"python3","display_name":"Python 3.9.5 64-bit"},"interpreter":{"hash":"767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90"}}, Arg 3: undefined, Return Value: {"kind":"startUsingPythonInterpreter","kernelSpec":{"specFile":"/home/pnogas/.local/share/jupyter/kernels/python388jvsc74a57bd0767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90/kernel.json","interpreterPath":"/usr/bin/python","name":"python388jvsc74a57bd0767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90","argv":["python","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","path":"python","display_name":"Python 3.8.8 64-bit","metadata":{"interpreter":{"sysPrefix":"/usr","envType":"Unknown","envName":"","envPath":"","path":"/usr/bin/python","architecture":3,"sysVersion":"3.8.8 (default, Nov 10 2011, 15:00:00) \n[GCC 10.2.0]","version":{"raw":"3.8.8","major":3,"minor":8,"patch":8,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.8 64-bit"}},"env":{}},"interpreter":{"sysPrefix":"/usr","envType":"Unknown","envName":"","envPath":"","path":"/usr/bin/python","architecture":3,"sysVersion":"3.8.8 (default, Nov 10 2011, 15:00:00) \n[GCC 10.2.0]","version":{"raw":"3.8.8","major":3,"minor":8,"patch":8,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.8 64-bit"},"id":".jvsc74a57bd0767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90./usr/bin/python./usr/bin/python"} Info 2021-06-23 20:12:52: Computing working directory file:///home/pnogas/Code/notebooks/avocado.ipynb Info 2021-06-23 20:12:52: Connecting to raw session for file:///home/pnogas/Code/notebooks/avocado.ipynb with connection {"kind":"startUsingPythonInterpreter","kernelSpec":{"specFile":"/home/pnogas/.local/share/jupyter/kernels/python388jvsc74a57bd0767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90/kernel.json","interpreterPath":"/usr/bin/python","name":"python388jvsc74a57bd0767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90","argv":["python","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","path":"python","display_name":"Python 3.8.8 64-bit","metadata":{"interpreter":{"sysPrefix":"/usr","envType":"Unknown","envName":"","envPath":"","path":"/usr/bin/python","architecture":3,"sysVersion":"3.8.8 (default, Nov 10 2011, 15:00:00) \n[GCC 10.2.0]","version":{"raw":"3.8.8","major":3,"minor":8,"patch":8,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.8 64-bit"}},"env":{}},"interpreter":{"sysPrefix":"/usr","envType":"Unknown","envName":"","envPath":"","path":"/usr/bin/python","architecture":3,"sysVersion":"3.8.8 (default, Nov 10 2011, 15:00:00) \n[GCC 10.2.0]","version":{"raw":"3.8.8","major":3,"minor":8,"patch":8,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.8 64-bit"},"id":".jvsc74a57bd0767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90./usr/bin/python./usr/bin/python"} Info 2021-06-23 20:12:52: Starting raw kernel Python 3.8.8 64-bit Info 2021-06-23 20:12:52: installMissingDependencies /usr/bin/python Info 2021-06-23 20:12:52: Cached data exists getEnvironmentVariables, Info 2021-06-23 20:12:53: Process Execution: > /usr/bin/python -c "import ipykernel" > /usr/bin/python -c "import ipykernel" Info 2021-06-23 20:12:53: Process Execution: > /usr/bin/python -c "import ipykernel" > /usr/bin/python -c "import ipykernel" Error 2021-06-23 20:12:53: Install Missing Dependencies, Class name = w, completed in 454ms, has a falsy return value, Return Value: undefined [a [Error]: IPyKernel not installed into interpreter Python 3.8.8 64-bit:/usr/bin/python at w.handleKernelDependencyResponse (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244702) at w.installMissingDependencies (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244075)] { category: 'noipykernel', reason: 1 } Error 2021-06-23 20:12:53: Raw session failed to start because dependencies not installed Info 2021-06-23 20:12:53: Shutdown session -- complete Error 2021-06-23 20:12:53: Failed to determine if a notebook is active for the current editor [a [Error]: IPyKernel not installed into interpreter Python 3.8.8 64-bit:/usr/bin/python at w.handleKernelDependencyResponse (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244702) at w.installMissingDependencies (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244075)] { category: 'noipykernel', reason: 1 } Error 2021-06-23 20:12:53: Failed to initialize ipywidgetHandler [a [Error]: IPyKernel not installed into interpreter Python 3.8.8 64-bit:/usr/bin/python at w.handleKernelDependencyResponse (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244702) at w.installMissingDependencies (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244075)] { category: 'noipykernel', reason: 1 } Info 2021-06-23 20:12:53: Web view react rendered Info 2021-06-23 20:12:53: Request for onigasm file at /home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/node_modules/onigasm/lib/onigasm.wasm Info 2021-06-23 20:12:53: Request for tmlanguage file. Info 2021-06-23 20:12:53: Searching for token colors ... Info 2021-06-23 20:12:53: Attempting search for colors ... Info 2021-06-23 20:12:54: Searching for token colors ... Info 2021-06-23 20:12:54: Attempting search for colors ... Info 2021-06-23 20:12:54: Searching for token colors ... Info 2021-06-23 20:12:54: Attempting search for colors ... Info 2021-06-23 20:12:54: Searching for token colors ... Info 2021-06-23 20:12:54: Attempting search for colors ... Info 2021-06-23 20:12:55: Searching for token colors ... Info 2021-06-23 20:12:55: Attempting search for colors ... Info 2021-06-23 20:12:55: Loading colors from /app/extra/vscode/resources/app/extensions/theme-defaults/themes/dark_plus.json ... Info 2021-06-23 20:12:55: Loading colors from /app/extra/vscode/resources/app/extensions/theme-defaults/themes/dark_plus.json ... Info 2021-06-23 20:12:55: Loading colors from /app/extra/vscode/resources/app/extensions/theme-defaults/themes/dark_plus.json ... Info 2021-06-23 20:12:55: Searching for token colors ... Info 2021-06-23 20:12:55: Attempting search for colors ... Info 2021-06-23 20:12:55: Loading colors from /app/extra/vscode/resources/app/extensions/theme-defaults/themes/dark_plus.json ... Info 2021-06-23 20:12:55: Loading colors from /app/extra/vscode/resources/app/extensions/theme-defaults/themes/dark_plus.json ... Info 2021-06-23 20:12:55: Searching for token colors ... Info 2021-06-23 20:12:55: Attempting search for colors ... Info 2021-06-23 20:12:55: Loading colors from /app/extra/vscode/resources/app/extensions/theme-defaults/themes/dark_plus.json ... Info 2021-06-23 20:12:55: Searching for token colors ... Info 2021-06-23 20:12:55: Attempting search for colors ... Info 2021-06-23 20:12:55: Loading colors from /app/extra/vscode/resources/app/extensions/theme-defaults/themes/dark_plus.json ... Info 2021-06-23 20:12:55: Loading colors from /app/extra/vscode/resources/app/extensions/theme-defaults/themes/dark_plus.json ... Info 2021-06-23 20:12:55: Attempting search for colors ... Info 2021-06-23 20:12:55: Attempting search for colors ... Info 2021-06-23 20:12:55: Loading base colors from /app/extra/vscode/resources/app/extensions/theme-defaults/themes/dark_plus.json ... Info 2021-06-23 20:12:55: Loading base colors from /app/extra/vscode/resources/app/extensions/theme-defaults/themes/dark_plus.json ... Info 2021-06-23 20:12:55: Attempting search for colors ... Info 2021-06-23 20:12:55: Attempting search for colors ... Info 2021-06-23 20:12:55: Attempting search for colors ... Info 2021-06-23 20:12:55: Loading base colors from /app/extra/vscode/resources/app/extensions/theme-defaults/themes/dark_plus.json ... Info 2021-06-23 20:12:55: Loading base colors from /app/extra/vscode/resources/app/extensions/theme-defaults/themes/dark_plus.json ... Info 2021-06-23 20:12:55: Loading base colors from /app/extra/vscode/resources/app/extensions/theme-defaults/themes/dark_plus.json ... Info 2021-06-23 20:12:55: Attempting search for colors ... Info 2021-06-23 20:12:55: Attempting search for colors ... Info 2021-06-23 20:12:55: Attempting search for colors ... Info 2021-06-23 20:12:55: Loading base colors from /app/extra/vscode/resources/app/extensions/theme-defaults/themes/dark_plus.json ... Info 2021-06-23 20:12:55: Loading base colors from /app/extra/vscode/resources/app/extensions/theme-defaults/themes/dark_plus.json ... Info 2021-06-23 20:12:55: Loading base colors from /app/extra/vscode/resources/app/extensions/theme-defaults/themes/dark_plus.json ... Info 2021-06-23 20:12:55: Using colors to generate CSS ... Info 2021-06-23 20:12:55: Using colors to generate CSS ... Info 2021-06-23 20:12:55: Using colors to generate CSS ... Info 2021-06-23 20:12:55: Using colors to generate CSS ... Info 2021-06-23 20:12:55: Using colors to generate CSS ... Info 2021-06-23 20:12:55: Using colors to generate CSS ... Info 2021-06-23 20:12:55: Using colors to generate CSS ... Info 2021-06-23 20:12:55: Using colors to generate CSS ... Info 2021-06-23 20:13:00: Executing cell NotebookImport#2 Info 2021-06-23 20:13:00: Waiting for jupyter server and web panel ... Info 2021-06-23 20:13:00: Creating raw notebook for file:///home/pnogas/Code/notebooks/avocado.ipynb Info 2021-06-23 20:13:00: Getting preferred kernel for file:///home/pnogas/Code/notebooks/avocado.ipynb Info 2021-06-23 20:13:00: findPreferredKernel score for Python3, Python 3.8.8 64-bit is 4 Info 2021-06-23 20:13:00: findPreferredKernel score for Python 3.8.8 64-bit is 4 Info 2021-06-23 20:13:00: findPreferredKernel score for Python3, Python 3.8.8 64-bit is 4 Info 2021-06-23 20:13:00: findPreferredKernel score for Python 3.8.8 64-bit is 4 Info 2021-06-23 20:13:00: findPreferredKernel score for Python3, Python 3.8.8 64-bit is 104 Info 2021-06-23 20:13:00: findPreferredKernel score for Python 3.8.8 64-bit is 104 Info 2021-06-23 20:13:00: findPreferredKernel score for Python3, Python 3.8.8 64-bit is 4 Info 2021-06-23 20:13:00: findPreferredKernel score for Python 3.8.8 64-bit is 4 Info 2021-06-23 20:13:00: findKernel found Python 3.8.8 64-bit Info 2021-06-23 20:13:00: Find kernel spec, Class name = T, completed in 7ms, has a truthy return value, Arg 1: , Arg 2: {"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.9.5"},"orig_nbformat":4,"kernelspec":{"name":"python3","display_name":"Python 3.9.5 64-bit"},"interpreter":{"hash":"767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90"}}, Arg 3: undefined, Return Value: {"kind":"startUsingPythonInterpreter","kernelSpec":{"specFile":"/home/pnogas/.local/share/jupyter/kernels/python388jvsc74a57bd0767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90/kernel.json","interpreterPath":"/usr/bin/python","name":"python388jvsc74a57bd0767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90","argv":["python","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","path":"python","display_name":"Python 3.8.8 64-bit","metadata":{"interpreter":{"sysPrefix":"/usr","envType":"Unknown","envName":"","envPath":"","path":"/usr/bin/python","architecture":3,"sysVersion":"3.8.8 (default, Nov 10 2011, 15:00:00) \n[GCC 10.2.0]","version":{"raw":"3.8.8","major":3,"minor":8,"patch":8,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.8 64-bit"}},"env":{}},"interpreter":{"sysPrefix":"/usr","envType":"Unknown","envName":"","envPath":"","path":"/usr/bin/python","architecture":3,"sysVersion":"3.8.8 (default, Nov 10 2011, 15:00:00) \n[GCC 10.2.0]","version":{"raw":"3.8.8","major":3,"minor":8,"patch":8,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.8 64-bit"},"id":".jvsc74a57bd0767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90./usr/bin/python./usr/bin/python"} Info 2021-06-23 20:13:00: Computing working directory file:///home/pnogas/Code/notebooks/avocado.ipynb Info 2021-06-23 20:13:00: Connecting to raw session for file:///home/pnogas/Code/notebooks/avocado.ipynb with connection {"kind":"startUsingPythonInterpreter","kernelSpec":{"specFile":"/home/pnogas/.local/share/jupyter/kernels/python388jvsc74a57bd0767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90/kernel.json","interpreterPath":"/usr/bin/python","name":"python388jvsc74a57bd0767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90","argv":["python","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","path":"python","display_name":"Python 3.8.8 64-bit","metadata":{"interpreter":{"sysPrefix":"/usr","envType":"Unknown","envName":"","envPath":"","path":"/usr/bin/python","architecture":3,"sysVersion":"3.8.8 (default, Nov 10 2011, 15:00:00) \n[GCC 10.2.0]","version":{"raw":"3.8.8","major":3,"minor":8,"patch":8,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.8 64-bit"}},"env":{}},"interpreter":{"sysPrefix":"/usr","envType":"Unknown","envName":"","envPath":"","path":"/usr/bin/python","architecture":3,"sysVersion":"3.8.8 (default, Nov 10 2011, 15:00:00) \n[GCC 10.2.0]","version":{"raw":"3.8.8","major":3,"minor":8,"patch":8,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.8 64-bit"},"id":".jvsc74a57bd0767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90./usr/bin/python./usr/bin/python"} Info 2021-06-23 20:13:00: Starting raw kernel Python 3.8.8 64-bit Info 2021-06-23 20:13:00: installMissingDependencies /usr/bin/python Info 2021-06-23 20:13:00: Cached data exists getEnvironmentVariables, Info 2021-06-23 20:13:00: Process Execution: > /usr/bin/python -c "import ipykernel" > /usr/bin/python -c "import ipykernel" Info 2021-06-23 20:13:00: Process Execution: > /usr/bin/python -c "import ipykernel" > /usr/bin/python -c "import ipykernel" Error 2021-06-23 20:13:02: Install Missing Dependencies, Class name = w, completed in 1833ms, has a falsy return value, Return Value: undefined [a [Error]: IPyKernel not installed into interpreter Python 3.8.8 64-bit:/usr/bin/python at w.handleKernelDependencyResponse (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244702) at w.installMissingDependencies (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244075) at processTicksAndRejections (internal/process/task_queues.js:93:5)] { category: 'noipykernel', reason: 1 } Error 2021-06-23 20:13:02: Raw session failed to start because dependencies not installed Info 2021-06-23 20:13:02: Shutdown session -- complete Error 2021-06-23 20:13:02: Exception attempting to start notebook: [a [Error]: IPyKernel not installed into interpreter Python 3.8.8 64-bit:/usr/bin/python at w.handleKernelDependencyResponse (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244702) at w.installMissingDependencies (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244075) at processTicksAndRejections (internal/process/task_queues.js:93:5)] { category: 'noipykernel', reason: 1 } Info 2021-06-23 20:13:02: Exception executing cell NotebookImport#2: [a [Error]: IPyKernel not installed into interpreter Python 3.8.8 64-bit:/usr/bin/python at w.handleKernelDependencyResponse (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244702) at w.installMissingDependencies (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244075) at processTicksAndRejections (internal/process/task_queues.js:93:5)] { category: 'noipykernel', reason: 1 } Info 2021-06-23 20:13:02: Finished executing cell NotebookImport#2 Error 2021-06-23 20:13:02: DataScience Error [a [Error]: IPyKernel not installed into interpreter Python 3.8.8 64-bit:/usr/bin/python at w.handleKernelDependencyResponse (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244702) at w.installMissingDependencies (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244075) at processTicksAndRejections (internal/process/task_queues.js:93:5)] { category: 'noipykernel', reason: 1 } Info 2021-06-23 20:17:16: Executing cell NotebookImport#0 Info 2021-06-23 20:17:16: Waiting for jupyter server and web panel ... Info 2021-06-23 20:17:16: Creating raw notebook for file:///home/pnogas/Code/notebooks/avocado.ipynb Info 2021-06-23 20:17:16: Getting preferred kernel for file:///home/pnogas/Code/notebooks/avocado.ipynb Info 2021-06-23 20:17:16: findPreferredKernel score for Python3, Python 3.8.8 64-bit is 4 Info 2021-06-23 20:17:16: findPreferredKernel score for Python 3.8.8 64-bit is 4 Info 2021-06-23 20:17:16: findPreferredKernel score for Python3, Python 3.8.8 64-bit is 4 Info 2021-06-23 20:17:16: findPreferredKernel score for Python 3.8.8 64-bit is 4 Info 2021-06-23 20:17:16: findPreferredKernel score for Python3, Python 3.8.8 64-bit is 104 Info 2021-06-23 20:17:16: findPreferredKernel score for Python 3.8.8 64-bit is 104 Info 2021-06-23 20:17:16: findPreferredKernel score for Python3, Python 3.8.8 64-bit is 4 Info 2021-06-23 20:17:16: findPreferredKernel score for Python 3.8.8 64-bit is 4 Info 2021-06-23 20:17:16: findKernel found Python 3.8.8 64-bit Info 2021-06-23 20:17:16: Find kernel spec, Class name = T, completed in 6ms, has a truthy return value, Arg 1: , Arg 2: {"language_info":{"codemirror_mode":{"name":"ipython","version":3},"file_extension":".py","mimetype":"text/x-python","name":"python","nbconvert_exporter":"python","pygments_lexer":"ipython3","version":"3.9.5"},"orig_nbformat":4,"kernelspec":{"name":"python3","display_name":"Python 3.9.5 64-bit"},"interpreter":{"hash":"767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90"}}, Arg 3: undefined, Return Value: {"kind":"startUsingPythonInterpreter","kernelSpec":{"specFile":"/home/pnogas/.local/share/jupyter/kernels/python388jvsc74a57bd0767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90/kernel.json","interpreterPath":"/usr/bin/python","name":"python388jvsc74a57bd0767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90","argv":["python","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","path":"python","display_name":"Python 3.8.8 64-bit","metadata":{"interpreter":{"sysPrefix":"/usr","envType":"Unknown","envName":"","envPath":"","path":"/usr/bin/python","architecture":3,"sysVersion":"3.8.8 (default, Nov 10 2011, 15:00:00) \n[GCC 10.2.0]","version":{"raw":"3.8.8","major":3,"minor":8,"patch":8,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.8 64-bit"}},"env":{}},"interpreter":{"sysPrefix":"/usr","envType":"Unknown","envName":"","envPath":"","path":"/usr/bin/python","architecture":3,"sysVersion":"3.8.8 (default, Nov 10 2011, 15:00:00) \n[GCC 10.2.0]","version":{"raw":"3.8.8","major":3,"minor":8,"patch":8,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.8 64-bit"},"id":".jvsc74a57bd0767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90./usr/bin/python./usr/bin/python"} Info 2021-06-23 20:17:16: Computing working directory file:///home/pnogas/Code/notebooks/avocado.ipynb Info 2021-06-23 20:17:16: Connecting to raw session for file:///home/pnogas/Code/notebooks/avocado.ipynb with connection {"kind":"startUsingPythonInterpreter","kernelSpec":{"specFile":"/home/pnogas/.local/share/jupyter/kernels/python388jvsc74a57bd0767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90/kernel.json","interpreterPath":"/usr/bin/python","name":"python388jvsc74a57bd0767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90","argv":["python","-m","ipykernel_launcher","-f","{connection_file}"],"language":"python","path":"python","display_name":"Python 3.8.8 64-bit","metadata":{"interpreter":{"sysPrefix":"/usr","envType":"Unknown","envName":"","envPath":"","path":"/usr/bin/python","architecture":3,"sysVersion":"3.8.8 (default, Nov 10 2011, 15:00:00) \n[GCC 10.2.0]","version":{"raw":"3.8.8","major":3,"minor":8,"patch":8,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.8 64-bit"}},"env":{}},"interpreter":{"sysPrefix":"/usr","envType":"Unknown","envName":"","envPath":"","path":"/usr/bin/python","architecture":3,"sysVersion":"3.8.8 (default, Nov 10 2011, 15:00:00) \n[GCC 10.2.0]","version":{"raw":"3.8.8","major":3,"minor":8,"patch":8,"build":[],"prerelease":["final","0"]},"displayName":"Python 3.8.8 64-bit"},"id":".jvsc74a57bd0767d51c1340bd893661ea55ea3124f6de3c7a262a8b4abca0554b478b1e2ff90./usr/bin/python./usr/bin/python"} Info 2021-06-23 20:17:16: Starting raw kernel Python 3.8.8 64-bit Info 2021-06-23 20:17:16: installMissingDependencies /usr/bin/python Info 2021-06-23 20:17:17: Cached data exists getEnvironmentVariables, Info 2021-06-23 20:17:17: Process Execution: > /usr/bin/python -c "import ipykernel" > /usr/bin/python -c "import ipykernel" Info 2021-06-23 20:17:17: Process Execution: > /usr/bin/python -c "import ipykernel" > /usr/bin/python -c "import ipykernel" Error 2021-06-23 20:17:18: Install Missing Dependencies, Class name = w, completed in 1244ms, has a falsy return value, Return Value: undefined [a [Error]: IPyKernel not installed into interpreter Python 3.8.8 64-bit:/usr/bin/python at w.handleKernelDependencyResponse (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244702) at w.installMissingDependencies (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244075) at processTicksAndRejections (internal/process/task_queues.js:93:5)] { category: 'noipykernel', reason: 1 } Error 2021-06-23 20:17:18: Raw session failed to start because dependencies not installed Info 2021-06-23 20:17:18: Shutdown session -- complete Error 2021-06-23 20:17:18: Exception attempting to start notebook: [a [Error]: IPyKernel not installed into interpreter Python 3.8.8 64-bit:/usr/bin/python at w.handleKernelDependencyResponse (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244702) at w.installMissingDependencies (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244075) at processTicksAndRejections (internal/process/task_queues.js:93:5)] { category: 'noipykernel', reason: 1 } Info 2021-06-23 20:17:18: Exception executing cell NotebookImport#0: [a [Error]: IPyKernel not installed into interpreter Python 3.8.8 64-bit:/usr/bin/python at w.handleKernelDependencyResponse (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244702) at w.installMissingDependencies (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244075) at processTicksAndRejections (internal/process/task_queues.js:93:5)] { category: 'noipykernel', reason: 1 } Info 2021-06-23 20:17:18: Finished executing cell NotebookImport#0 Error 2021-06-23 20:17:18: DataScience Error [a [Error]: IPyKernel not installed into interpreter Python 3.8.8 64-bit:/usr/bin/python at w.handleKernelDependencyResponse (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244702) at w.installMissingDependencies (/home/pnogas/.var/app/com.visualstudio.code/data/vscode/extensions/ms-toolsai.jupyter-2021.6.999406279/out/client/extension.js:90:244075) at processTicksAndRejections (internal/process/task_queues.js:93:5)] { category: 'noipykernel', reason: 1 }

``` XXX ```

rchiodo commented 3 years ago

Thanks for the bug. Can you include the contents of the 'Jupyter' output panel?

Additionally what's flatpack? Are you talking about this? https://flathub.org/apps/details/com.visualstudio.code

I don't believe that's a supported way to install VS code.

ghost commented 3 years ago

Thanks for the bug. Can you include the contents of the 'Jupyter' output panel?

Okay added it

Additionally what's flatpack? Are you talking about this? https://flathub.org/apps/details/com.visualstudio.code

Yes

I don't believe that's a supported way to install VS code.

i mean yeah, that's true. I'm not sure if this issue is on extension or on distribution side. So if you think it's not problem that is caused by any bug in extension you can close issue and I will just create issue on flathub's github

rchiodo commented 3 years ago

It looks like your extension is out of date. Latest should be this:

v2021.6.999937645

However the output shows it using '/usr/bin/python' (also known as Python 3.8.8) as the python interpreter. It attempts to load ipykernel and fails which is what is giving you the error.

You said this:

when executing normal python code it works properly - it uses system's python

Not sure what you mean by executing normal python code. Jupyter needs ipykernel to work. Did you mean executing from a jupyter notebook or from a plain python repl?

ghost commented 3 years ago

However the output shows it using '/usr/bin/python' (also known as Python 3.8.8) as the python interpreter. It attempts to load ipykernel and fails which is what is giving you the error.

That's weird :thinking: , my OS's python is 3.9.5. So it looks like it's flatpak's fault. Thanks!