Closed samueltootle closed 1 year ago
Things I have tried to do based on previous issues and internet related research:
sorry you are running into this issue, please could you try the pre-release version
Open the extensions page, search for Jupyter and click the button Switch to Pre-Release Version
Similarly please install the Pre-Release
version of the Python extension.
@DonJayamanne I have switched to the pre-release version of Jupyter and Python (see log for versions). This time it took ~6min for Loading/Discovering kernels to complete.
Visual Studio Code (1.75.1, undefined, desktop)
Jupyter Extension Version: 2023.2.1000541047.
Python Extension Version: 2023.5.10591006.
Workspace folder $$$$
User belongs to experiment group 'jupyterTest'
User belongs to experiment group 'jupyterEnhancedDataViewer'
info 11:33:50.651: LSP Notebooks experiment is enabled
info 11:33:51.107: Find preferred kernel for $$$$/figs/plot_eb.ipynb with metadata {"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"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.10.6"},"orig_nbformat":4,"vscode":{"interpreter":{"hash":"916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1"}}} & preferred interpreter /bin/python3
info 11:33:51.107: Find preferred kernel for $$$$/figs/plot_eb.ipynb with metadata {"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"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.10.6"},"orig_nbformat":4,"vscode":{"interpreter":{"hash":"916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1"}}} & preferred interpreter /bin/python3
info 11:33:51.144: Find preferred kernel for $$$$/figs/plot_eb.ipynb with metadata {"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"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.10.6"},"orig_nbformat":4,"vscode":{"interpreter":{"hash":"916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1"}}} & preferred interpreter /bin/python3
info 11:33:51.145: Preferred kernel .jvsc74a57bd0916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1./bin/python3./bin/python3.-m#ipykernel_launcher is exact match or top match for non python kernels, (true, [object Object], true, false)
info 11:33:51.145: PreferredConnection: .jvsc74a57bd0916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1./bin/python3./bin/python3.-m#ipykernel_launcher found for NotebookDocument: $$$$/figs/plot_eb.ipynb
warn 11:33:51.291: Failed to get activated env vars with python /bin/python3 in 181ms
info 11:33:51.324: Process Execution: > /bin/python3 -c "import site;print("USER_BASE_VALUE");print(site.USER_SITE);print("USER_BASE_VALUE");"
> /bin/python3 -c "import site;print("USER_BASE_VALUE");print(site.USER_SITE);print("USER_BASE_VALUE");"
info 11:33:51.369: Process Execution: > /bin/python3 -m pip list
> /bin/python3 -m pip list
info 11:37:10.685: Loading webview. View is notset
info 11:37:10.686: Loading web view...
info 11:37:10.687: Webview panel created.
This time it took ~6min for Loading/Discovering kernels to complete.
Please could you enable verbose logging for Jupyter and Python extensions as follows
Jupyter->Logging
verbose
Python->Logging
debug
Jupyter
output panel.Python
output panel.
Paste the contents here or upload the contents as two text files.Hi @DonJayamanne Thanks for the advice. Looking at the Python3 debug log I found there was quite some time being spent analyzing various lmod directories whenever vscode tried to look for python interpreters. I had installed lmod previously, but never setup it up nor installed modules to use through it. After uninstalling lmod, my startup time is ~1min now. The new debug log is below where there are quite a few
Extension unknown accessed
Maybe there is additional time being lost here as well. Thanks for your help.
Python
in the Output
panel - debug
Experiment 'pythonPromptNewToolsExt' is active
[DEBUG 2023-2-1 13:28:47.920]: Cached data exists KeyPrefix=Cache_Method_Output_m.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/$$$$"-Arg-Separator-undefined
[DEBUG 2023-2-1 13:28:47.923]: Cached data exists KeyPrefix=Cache_Method_Output_m.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/$$$$"-Arg-Separator-undefined
[DEBUG 2023-2-1 13:28:47.923]: Cached data exists KeyPrefix=Cache_Method_Output_m.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/$$$$"-Arg-Separator-undefined
[DEBUG 2023-2-1 13:28:47.933]: Cached data exists KeyPrefix=Cache_Method_Output_m.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/$$$$"-Arg-Separator-undefined
[DEBUG 2023-2-1 13:28:47.933]: Cached data exists KeyPrefix=Cache_Method_Output_m.addKeyToStorage-Args="global"-Arg-Separator-"WORKSPACE_FOLDER_INTERPRETER_PATH_/$$$$"-Arg-Separator-undefined
[DEBUG 2023-2-1 13:28:47.948]: Waiting for test server to start...
LSP Notebooks experiment is enabled
LSP Notebooks interactive window support is enabled
[INFO 2023-2-1 13:28:47.957]: [
'Display locator refreshing progress, Class name = f, completed in 0ms, has a falsy return value, , Return Value: undefined'
]
[DEBUG 2023-2-1 13:28:47.962]: Searching for conda.
[DEBUG 2023-2-1 13:28:47.962]: Probing conda binary: conda
[DEBUG 2023-2-1 13:28:47.968]: VS Code was not launched from the command line, not selecting activated interpreter
[DEBUG 2023-2-1 13:28:47.978]: Test server started.
[DEBUG 2023-2-1 13:28:47.978]: Testing: Setting up watcher for /$$$$
[DEBUG 2023-2-1 13:28:47.980]: Needed to validate /bin/python3 with latest info
[DEBUG 2023-2-1 13:28:47.980]: Resolved /bin/python3 from cache: {"name":"","location":"","kind":"global-other","executable":{"filename":"/bin/python3","sysPrefix":"/usr","ctime":1676122361404,"mtime":1660819144000},"display":"Python 3.10.6 64-bit","version":{"major":3,"minor":10,"micro":6,"release":{"level":"final","serial":0},"sysVersion":"3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]"},"arch":3,"distro":{"org":""},"source":["path env var"],"id":"/bin/python3","detailedDisplayName":"Python 3.10.6 64-bit"}
[DEBUG 2023-2-1 13:28:47.982]: Needed to validate /bin/python3 with latest info
[DEBUG 2023-2-1 13:28:47.982]: Resolved /bin/python3 from cache: {"name":"","location":"","kind":"global-other","executable":{"filename":"/bin/python3","sysPrefix":"/usr","ctime":1676122361404,"mtime":1660819144000},"display":"Python 3.10.6 64-bit","version":{"major":3,"minor":10,"micro":6,"release":{"level":"final","serial":0},"sysVersion":"3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]"},"arch":3,"distro":{"org":""},"source":["path env var"],"id":"/bin/python3","detailedDisplayName":"Python 3.10.6 64-bit"}
[DEBUG 2023-2-1 13:28:47.983]: Needed to validate /bin/python3 with latest info
[DEBUG 2023-2-1 13:28:47.983]: Resolved /bin/python3 from cache: {"name":"","location":"","kind":"global-other","executable":{"filename":"/bin/python3","sysPrefix":"/usr","ctime":1676122361404,"mtime":1660819144000},"display":"Python 3.10.6 64-bit","version":{"major":3,"minor":10,"micro":6,"release":{"level":"final","serial":0},"sysVersion":"3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]"},"arch":3,"distro":{"org":""},"source":["path env var"],"id":"/bin/python3","detailedDisplayName":"Python 3.10.6 64-bit"}
[DEBUG 2023-2-1 13:28:47.987]: Needed to validate /bin/python3 with latest info
[DEBUG 2023-2-1 13:28:47.987]: Resolved /bin/python3 from cache: {"name":"","location":"","kind":"global-other","executable":{"filename":"/bin/python3","sysPrefix":"/usr","ctime":1676122361404,"mtime":1660819144000},"display":"Python 3.10.6 64-bit","version":{"major":3,"minor":10,"micro":6,"release":{"level":"final","serial":0},"sysVersion":"3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]"},"arch":3,"distro":{"org":""},"source":["path env var"],"id":"/bin/python3","detailedDisplayName":"Python 3.10.6 64-bit"}
[DEBUG 2023-2-1 13:28:47.987]: Needed to validate /bin/python3 with latest info
[DEBUG 2023-2-1 13:28:47.987]: Resolved /bin/python3 from cache: {"name":"","location":"","kind":"global-other","executable":{"filename":"/bin/python3","sysPrefix":"/usr","ctime":1676122361404,"mtime":1660819144000},"display":"Python 3.10.6 64-bit","version":{"major":3,"minor":10,"micro":6,"release":{"level":"final","serial":0},"sysVersion":"3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]"},"arch":3,"distro":{"org":""},"source":["path env var"],"id":"/bin/python3","detailedDisplayName":"Python 3.10.6 64-bit"}
[DEBUG 2023-2-1 13:28:47.988]: Needed to validate /bin/python3 with latest info
[DEBUG 2023-2-1 13:28:47.988]: Resolved /bin/python3 from cache: {"name":"","location":"","kind":"global-other","executable":{"filename":"/bin/python3","sysPrefix":"/usr","ctime":1676122361404,"mtime":1660819144000},"display":"Python 3.10.6 64-bit","version":{"major":3,"minor":10,"micro":6,"release":{"level":"final","serial":0},"sysVersion":"3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]"},"arch":3,"distro":{"org":""},"source":["path env var"],"id":"/bin/python3","detailedDisplayName":"Python 3.10.6 64-bit"}
[DEBUG 2023-2-1 13:28:47.988]: Needed to validate /bin/python3 with latest info
[DEBUG 2023-2-1 13:28:47.988]: Resolved /bin/python3 from cache: {"name":"","location":"","kind":"global-other","executable":{"filename":"/bin/python3","sysPrefix":"/usr","ctime":1676122361404,"mtime":1660819144000},"display":"Python 3.10.6 64-bit","version":{"major":3,"minor":10,"micro":6,"release":{"level":"final","serial":0},"sysVersion":"3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]"},"arch":3,"distro":{"org":""},"source":["path env var"],"id":"/bin/python3","detailedDisplayName":"Python 3.10.6 64-bit"}
[DEBUG 2023-2-1 13:28:47.990]: Dump environment variables {
"AUTOJUMP_ERROR_PATH": "/$$$$/.local/share/autojump/errors.log",
"AUTOJUMP_SOURCED": "1",
"BASH_ENV": "/opt/apps/lmod/lmod/init/bash",
"CHROME_DESKTOP": "code-url-handler.desktop",
"DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/1000/bus",
"DESKTOP_SESSION": "pop",
"DISPLAY": ":0",
"ENV_SETUP": "home",
"EVO_SETUP": "BBH",
"GDK_BACKEND": "x11",
"GDMSESSION": "pop",
"GIO_LAUNCHED_DESKTOP_FILE": "/usr/share/applications/code.desktop",
"GIO_LAUNCHED_DESKTOP_FILE_PID": "18823",
"GJS_DEBUG_OUTPUT": "stderr",
"GJS_DEBUG_TOPICS": "JS ERROR;JS LOG",
"GNOME_DESKTOP_SESSION_ID": "this-is-deprecated",
"GNOME_SHELL_SESSION_MODE": "pop",
"GPG_AGENT_INFO": "/run/user/1000/gnupg/S.gpg-agent:0:1",
"GTK_IM_MODULE": "ibus",
"GTK_MODULES": "gail:atk-bridge",
"HOME": "/$$$$",
"HOME_KADATH": "/$$$$/lib/kadath",
"HOME_LORENE": "/$$$$/lib/Lorene",
"INVOCATION_ID": "135fd41b2b4f4c39a310eecbee0c6814",
"JOURNAL_STREAM": "8:34165",
"LANG": "en_US.UTF-8",
"LANGUAGE": "en_US:en",
"LC_ADDRESS": "en_US.UTF-8",
"LC_IDENTIFICATION": "en_US.UTF-8",
"LC_MEASUREMENT": "en_US.UTF-8",
"LC_MONETARY": "en_US.UTF-8",
"LC_NAME": "en_US.UTF-8",
"LC_NUMERIC": "en_US.UTF-8",
"LC_PAPER": "en_US.UTF-8",
"LC_TELEPHONE": "en_US.UTF-8",
"LC_TIME": "en_US.UTF-8",
"LESSCLOSE": "/bin/lesspipe %s %s",
"LESSOPEN": "| /bin/lesspipe %s",
"LMOD_CMD": "/opt/apps/lmod/lmod/libexec/lmod",
"LMOD_DIR": "/opt/apps/lmod/lmod/libexec",
"LMOD_PKG": "/opt/apps/lmod/lmod",
"LMOD_ROOT": "/opt/apps/lmod",
"LMOD_SETTARG_FULL_SUPPORT": "no",
"LMOD_VERSION": "8.7.19",
"LMOD_sys": "Linux",
"LOGNAME": "user",
"MANAGERPID": "1195",
"MANPATH": "/opt/apps/lmod/lmod/share/man:",
"MODULEPATH": "/opt/apps/modulefiles/Linux:/opt/apps/modulefiles/Core:/opt/apps/lmod/lmod/modulefiles/Core",
"MODULEPATH_ROOT": "/opt/apps/modulefiles",
"MODULESHOME": "/opt/apps/lmod/lmod",
"MOPI_MOVIES_DIR": "/$$$$/lib/kuibit/examples/mopi_movies/",
"ORIGINAL_XDG_CURRENT_DESKTOP": "pop:GNOME",
"PAPERSIZE": "letter",
"PWD": "/$$$$",
"QT_ACCESSIBILITY": "1",
"QT_IM_MODULE": "ibus",
"SESSION_MANAGER": "local/pop-os:@/tmp/.ICE-unix/1676,unix/pop-os:/tmp/.ICE-unix/1676",
"SHELL": "/bin/bash",
"SHLVL": "0",
"SPACK_PYTHON": "/usr/bin/python3",
"SPACK_ROOT": "/$$$$/lib/spack",
"SSH_AGENT_LAUNCHER": "gnome-keyring",
"SSH_AUTH_SOCK": "/run/user/1000/keyring/ssh",
"SYSTEMD_EXEC_PID": "1699",
"USER": "user",
"USERNAME": "user",
"VSCODE_AMD_ENTRYPOINT": "vs/workbench/api/node/extensionHostProcess",
"VSCODE_CODE_CACHE_PATH": "/$$$$/.config/Code/CachedData/441438abd1ac652551dbe4d408dfcec8a499b8bf",
"VSCODE_CWD": "/$$$$",
"VSCODE_HANDLES_UNCAUGHT_ERRORS": "true",
"VSCODE_IPC_HOOK": "/run/user/1000/vscode-16068fa4-1.75.1-main.sock",
"VSCODE_NLS_CONFIG": "{\"locale\":\"en-us\",\"availableLanguages\":{},\"_languagePackSupport\":true}",
"VSCODE_PID": "18823",
"WINDOWPATH": "2",
"XAUTHORITY": "/run/user/1000/gdm/Xauthority",
"XDG_CONFIG_DIRS": "/etc/xdg/xdg-pop:/etc/xdg",
"XDG_CURRENT_DESKTOP": "Unity",
"XDG_DATA_DIRS": "/usr/share/pop:/usr/share/gnome:/$$$$/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share/:/usr/share/",
"XDG_MENU_PREFIX": "gnome-",
"XDG_RUNTIME_DIR": "/run/user/1000",
"XDG_SESSION_CLASS": "user",
"XDG_SESSION_DESKTOP": "pop",
"XDG_SESSION_TYPE": "x11",
"XMODIFIERS": "@im=ibus",
"_": "/usr/share/code/code",
"ELECTRON_RUN_AS_NODE": "1",
"APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL": "true",
"PATH": "/$$$$/.poetry/bin:/$$$$/.autojump/bin:/usr/share/sagemath/bin:/snap/bin:/usr/local/games:/usr/games:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/$$$$/lib/spack/bin:/$$$$/bin:/$$$$/.local/bin:/$$$$/.poetry/bin::/$$$$/lib/kuibit/examples/bins/"
}
> conda info --json
[DEBUG 2023-2-1 13:28:48.10]: Failed to spawn conda binary conda [Error: spawn conda ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:478:16)
at process.processTicksAndRejections (node:internal/process/task_queues:83:21)] {
errno: -2,
code: 'ENOENT',
syscall: 'spawn conda',
path: 'conda',
spawnargs: [ 'info', '--json' ]
}
[DEBUG 2023-2-1 13:28:48.11]: Couldn't locate the state binary.
[DEBUG 2023-2-1 13:28:48.12]: Searching for workspace virtual envs in: /$$$$
[DEBUG 2023-2-1 13:28:48.13]: Needed to validate /bin/python3 with latest info
[DEBUG 2023-2-1 13:28:48.13]: Resolved /bin/python3 from cache: {"name":"","location":"","kind":"global-other","executable":{"filename":"/bin/python3","sysPrefix":"/usr","ctime":1676122361404,"mtime":1660819144000},"display":"Python 3.10.6 64-bit","version":{"major":3,"minor":10,"micro":6,"release":{"level":"final","serial":0},"sysVersion":"3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]"},"arch":3,"distro":{"org":""},"source":["path env var"],"id":"/bin/python3","detailedDisplayName":"Python 3.10.6 64-bit"}
Python interpreter path: /bin/python3
[DEBUG 2023-2-1 13:28:48.14]: Cached data exists KeyPrefix=Cache_Method_Output_b._selectIfLaunchedViaActivatedEnv-Args=true
[DEBUG 2023-2-1 13:28:48.14]: Found cached env for /bin/python3
[DEBUG 2023-2-1 13:28:48.14]: Resolved /bin/python3 from cache: {"name":"","location":"","kind":"global-other","executable":{"filename":"/bin/python3","sysPrefix":"/usr","ctime":1676122361404,"mtime":1660819144000},"display":"Python 3.10.6 64-bit","version":{"major":3,"minor":10,"micro":6,"release":{"level":"final","serial":0},"sysVersion":"3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]"},"arch":3,"distro":{"org":""},"source":["path env var"],"id":"/bin/python3","detailedDisplayName":"Python 3.10.6 64-bit"}
[DEBUG 2023-2-1 13:28:48.69]: Found cached env for /bin/python3
[DEBUG 2023-2-1 13:28:48.69]: Resolved /bin/python3 from cache: {"name":"","location":"","kind":"global-other","executable":{"filename":"/bin/python3","sysPrefix":"/usr","ctime":1676122361404,"mtime":1660819144000},"display":"Python 3.10.6 64-bit","version":{"major":3,"minor":10,"micro":6,"release":{"level":"final","serial":0},"sysVersion":"3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]"},"arch":3,"distro":{"org":""},"source":["path env var"],"id":"/bin/python3","detailedDisplayName":"Python 3.10.6 64-bit"}
[DEBUG 2023-2-1 13:28:48.90]: Found cached env for /bin/python3
[DEBUG 2023-2-1 13:28:48.90]: Resolved /bin/python3 from cache: {"name":"","location":"","kind":"global-other","executable":{"filename":"/bin/python3","sysPrefix":"/usr","ctime":1676122361404,"mtime":1660819144000},"display":"Python 3.10.6 64-bit","version":{"major":3,"minor":10,"micro":6,"release":{"level":"final","serial":0},"sysVersion":"3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]"},"arch":3,"distro":{"org":""},"source":["path env var"],"id":"/bin/python3","detailedDisplayName":"Python 3.10.6 64-bit"}
[DEBUG 2023-2-1 13:28:48.259]: Extension unknown accessed onDidEnvironmentVariablesChange with args: undefined
[DEBUG 2023-2-1 13:28:48.259]: Extension unknown accessed getEnvironmentVariables with args: undefined
[DEBUG 2023-2-1 13:28:48.259]: Extension unknown accessed onDidChangeActiveEnvironmentPath with args: undefined
[DEBUG 2023-2-1 13:28:48.260]: Extension unknown accessed onDidChangeEnvironments with args: undefined
[DEBUG 2023-2-1 13:28:48.260]: Extension unknown accessed getActiveEnvironmentPath with args: undefined
[DEBUG 2023-2-1 13:28:48.261]: Extension unknown accessed resolveEnvironment with args: {"id":"/bin/python3","path":"/bin/python3"}
[DEBUG 2023-2-1 13:28:48.261]: Extension unknown accessed getActiveEnvironmentPath with args: undefined
[DEBUG 2023-2-1 13:28:48.261]: Extension unknown accessed resolveEnvironment with args: {"id":"/bin/python3","path":"/bin/python3"}
[DEBUG 2023-2-1 13:28:48.261]: Extension unknown accessed getActiveEnvironmentPath with args: undefined
[DEBUG 2023-2-1 13:28:48.262]: Extension unknown accessed resolveEnvironment with args: {"id":"/bin/python3","path":"/bin/python3"}
[DEBUG 2023-2-1 13:28:48.262]: Extension unknown accessed getActiveEnvironmentPath with args: undefined
[DEBUG 2023-2-1 13:28:48.263]: Extension unknown accessed resolveEnvironment with args: {"id":"/bin/python3","path":"/bin/python3"}
[DEBUG 2023-2-1 13:28:48.263]: Extension unknown accessed getActiveEnvironmentPath with args: undefined
[DEBUG 2023-2-1 13:28:48.263]: Extension unknown accessed resolveEnvironment with args: {"id":"/bin/python3","path":"/bin/python3"}
[DEBUG 2023-2-1 13:28:48.263]: Extension unknown accessed getActiveEnvironmentPath with args: undefined
[DEBUG 2023-2-1 13:28:48.263]: Extension unknown accessed resolveEnvironment with args: {"id":"/bin/python3","path":"/bin/python3"}
[DEBUG 2023-2-1 13:28:48.263]: Extension unknown accessed known with args: undefined
[DEBUG 2023-2-1 13:28:48.263]: Extension unknown accessed getActiveEnvironmentPath with args: undefined
[DEBUG 2023-2-1 13:28:48.264]: Extension unknown accessed resolveEnvironment with args: {"id":"/bin/python3","path":"/bin/python3"}
[DEBUG 2023-2-1 13:28:48.269]: Found cached env for /bin/python3
[DEBUG 2023-2-1 13:28:48.270]: Resolved /bin/python3 from cache: {"name":"","location":"","kind":"global-other","executable":{"filename":"/bin/python3","sysPrefix":"/usr","ctime":1676122361404,"mtime":1660819144000},"display":"Python 3.10.6 64-bit","version":{"major":3,"minor":10,"micro":6,"release":{"level":"final","serial":0},"sysVersion":"3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]"},"arch":3,"distro":{"org":""},"source":["path env var"],"id":"/bin/python3","detailedDisplayName":"Python 3.10.6 64-bit"}
[DEBUG 2023-2-1 13:28:48.270]: Found cached env for /bin/python3
[DEBUG 2023-2-1 13:28:48.270]: Resolved /bin/python3 from cache: {"name":"","location":"","kind":"global-other","executable":{"filename":"/bin/python3","sysPrefix":"/usr","ctime":1676122361404,"mtime":1660819144000},"display":"Python 3.10.6 64-bit","version":{"major":3,"minor":10,"micro":6,"release":{"level":"final","serial":0},"sysVersion":"3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]"},"arch":3,"distro":{"org":""},"source":["path env var"],"id":"/bin/python3","detailedDisplayName":"Python 3.10.6 64-bit"}
[DEBUG 2023-2-1 13:28:48.271]: Found cached env for /bin/python3
[DEBUG 2023-2-1 13:28:48.271]: Resolved /bin/python3 from cache: {"name":"","location":"","kind":"global-other","executable":{"filename":"/bin/python3","sysPrefix":"/usr","ctime":1676122361404,"mtime":1660819144000},"display":"Python 3.10.6 64-bit","version":{"major":3,"minor":10,"micro":6,"release":{"level":"final","serial":0},"sysVersion":"3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]"},"arch":3,"distro":{"org":""},"source":["path env var"],"id":"/bin/python3","detailedDisplayName":"Python 3.10.6 64-bit"}
[DEBUG 2023-2-1 13:28:48.279]: Activation Commands received undefined for shell bash
[INFO 2023-2-1 13:28:48.280]: [
'getActivatedEnvironmentVariables, Class name = k, completed in 291ms, has a falsy return value, Arg 1:
Jupyter
in the Output
panel - verbose
Visual Studio Code (1.75.1, undefined, desktop)
Jupyter Extension Version: 2023.2.1000541047.
Python Extension Version: 2023.5.10591006.
Workspace folder /$$$$
User belongs to experiment group 'jupyterTest'
User belongs to experiment group 'jupyterEnhancedDataViewer'
debug 13:28:47.394: Updating cache with Python kernels
, Added =
, Updated =
, Removed =
debug 13:28:47.396: Get Custom Env Variables, Class name = Vl (started execution), Arg 1: undefined, Arg 2: "RunPythonCode"
debug 13:28:47.399: Start refreshing Kernel Picker (1677673727399)
debug 13:28:47.400: Get Active Interpreter, Class name = zo (started execution), Arg 1: "~/postdoc/projects/high_mass_ratio_id/figs/plot_eb.ipynb"
debug 13:28:47.400: Get Active Interpreter, Class name = zo (started execution), Arg 1: undefined
debug 13:28:47.403: Get Active Interpreter, Class name = zo (started execution), Arg 1: "~/postdoc/projects/high_mass_ratio_id/figs/plot_eb.ipynb"
info 13:28:47.404: LSP Notebooks experiment is enabled
debug 13:28:47.404: Get Active Interpreter, Class name = zo (started execution), Arg 1: "~/postdoc/projects/high_mass_ratio_id"
debug 13:28:47.491: Get Active Interpreter, Class name = zo (started execution), Arg 1: undefined
debug 13:28:47.493: Updating cache with Local kernels startUsingLocalKernelSpec:'.python3./python./.-m#ipykernel_launcher (interpreter id = undefined)', startUsingLocalKernelSpec:'.python3./usr/bin/python3./.-m#ipykernel_launcher (interpreter id = undefined)', Added = startUsingLocalKernelSpec:'.python3./python./.-m#ipykernel_launcher (interpreter id = undefined)', startUsingLocalKernelSpec:'.python3./usr/bin/python3./.-m#ipykernel_launcher (interpreter id = undefined)', Updated = , Removed =
debug 13:28:47.493: Get Active Interpreter, Class name = zo (started execution), Arg 1: undefined
debug 13:28:47.493: Updating cache with Python kernels startUsingPythonInterpreter:'.jvsc74a57bd0916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1./bin/python3./bin/python3.-m#ipykernel_launcher (interpreter id = /bin/python3)', startUsingPythonInterpreter:'.jvsc74a57bd0f9f85f796d01129d0dd105a088854619f454435301f6ffec2fea96ecbd9be4ac./bin/python3.9./bin/python3.9.-m#ipykernel_launcher (interpreter id = /bin/python3.9)', startUsingPythonInterpreter:'.jvsc74a57bd031f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6./usr/bin/python3./usr/bin/python3.-m#ipykernel_launcher (interpreter id = /usr/bin/python3)', startUsingPythonInterpreter:'.jvsc74a57bd036cf16204b8548560b1c020c4e8fb5b57f0e4c58016f52f2d4be01e192833930./usr/bin/python3.9./usr/bin/python3.9.-m#ipykernel_launcher (interpreter id = /usr/bin/python3.9)'
, Added = startUsingPythonInterpreter:'.jvsc74a57bd0916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1./bin/python3./bin/python3.-m#ipykernel_launcher (interpreter id = /bin/python3)', startUsingPythonInterpreter:'.jvsc74a57bd0f9f85f796d01129d0dd105a088854619f454435301f6ffec2fea96ecbd9be4ac./bin/python3.9./bin/python3.9.-m#ipykernel_launcher (interpreter id = /bin/python3.9)', startUsingPythonInterpreter:'.jvsc74a57bd031f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6./usr/bin/python3./usr/bin/python3.-m#ipykernel_launcher (interpreter id = /usr/bin/python3)', startUsingPythonInterpreter:'.jvsc74a57bd036cf16204b8548560b1c020c4e8fb5b57f0e4c58016f52f2d4be01e192833930./usr/bin/python3.9./usr/bin/python3.9.-m#ipykernel_launcher (interpreter id = /usr/bin/python3.9)'
, Updated =
, Removed =
debug 13:28:47.495: Updating cache with Local kernels startUsingLocalKernelSpec:'.python3./python./.-m#ipykernel_launcher (interpreter id = undefined)', startUsingLocalKernelSpec:'.python3./usr/bin/python3./.-m#ipykernel_launcher (interpreter id = undefined)', Added = , Updated = , Removed =
debug 13:28:47.495: Updating cache with Python kernels startUsingPythonInterpreter:'.jvsc74a57bd0916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1./bin/python3./bin/python3.-m#ipykernel_launcher (interpreter id = /bin/python3)', startUsingPythonInterpreter:'.jvsc74a57bd0f9f85f796d01129d0dd105a088854619f454435301f6ffec2fea96ecbd9be4ac./bin/python3.9./bin/python3.9.-m#ipykernel_launcher (interpreter id = /bin/python3.9)', startUsingPythonInterpreter:'.jvsc74a57bd031f2aee4e71d21fbe5cf8b01ff0e069b9275f58929596ceb00d14d90e3e16cd6./usr/bin/python3./usr/bin/python3.-m#ipykernel_launcher (interpreter id = /usr/bin/python3)', startUsingPythonInterpreter:'.jvsc74a57bd036cf16204b8548560b1c020c4e8fb5b57f0e4c58016f52f2d4be01e192833930./usr/bin/python3.9./usr/bin/python3.9.-m#ipykernel_launcher (interpreter id = /usr/bin/python3.9)'
, Added =
, Updated =
, Removed =
debug 13:28:47.954: Get Active Interpreter, Class name = zo (started execution), Arg 1: undefined
debug 13:28:47.962: Get Custom Env Variables, Class name = Vl, completed in 566ms, has a truthy return value, Arg 1: undefined, Arg 2: "RunPythonCode"
debug 13:28:47.962: Get Jupyter Sub Paths, Class name = lp, completed in 566ms, has a truthy return value, Arg 1: "", Arg 2: "kernels", Return Value:
debug 13:28:47.963: Get Jupyter Kernel Paths, Class name = lp, completed in 567ms, has a truthy return value, Arg 1: "", Return Value:
debug 13:28:47.963: Get KernelSpec root path, Class name = lp, completed in 567ms, has a truthy return value, Arg 1: {"a":false,"b":null}, Return Value:
"import site;print("USER_BASE_VALUE");print(site.USER_SITE);print("USER_BASE_VALUE");" info 11:33:51.369: Process Execution: > /bin/python3 -m pip list /bin/python3 -m pip list
this code is async, hence will not block the discover of kernels Let’s leave that aside, else we end up focusing on the wrong thing
please can you try this
Apologies for the delay. Running things as you said took no time at all. I did some digging into the jupyter debug log and I found there was a lot of time spent on kernels I wasn't aware of including an old sagemath kernel. This was stored in $HOME/.local/share/jupyter/kernels
To see if this could be the problem, I uninstalled jupyter from my host system (apt remove jupyter-notebook) along with related jupyter packages. Sagemath was not installed anymore anyway, but there kernel was there. Afterwards, I renamed the jupyter directory such that:
$HOME/.local/share/jupyter
-> $HOME/.local/share/jupyter.bak
Finally, I started up VSCode and the interpreter loadtime was back to being a split second.
Thank you for your help @DonJayamanne for your assistance pointing me towards the debugging logs.
Environment data
Expected behaviour
When loading a fresh VSCode and loading an existing or new jupyter notebook, I would expect the jupyter notebook to start and utilize the previously discovered kernels to be used with the notebooks
Actual behaviour
Upon loading vscode and opening a new or existing notebook, vscode will sit at activating/loading extensions for 10+s and switch back and forth with discovering Python interpreters for 2+minutes. My naive assumption was that this would only occur the first time as some sort of a setup/initialization procedure, but this occurs every time and lasts for a minimum of 2min before I can execute a cell. On rare occasions it never proceeds past discovering python interpreters. If I close and reload VScode, I get the following error:
Running
killall code
from the command line will get rid of this error, but then I will sit at "Discovering..." as usual. It is worth noting that if I only execute a python script instead of a jupyter-notebook, there is no load/wait time.According to the output, it seems to sit idle after executing
/bin/python3 -m pip list
since I was not unable to execute a cell until ~2min after this command is executed.Steps to reproduce:
N/A
Logs
Output for
Jupyter
in theOutput
panelVisual Studio Code (1.75.1, undefined, desktop) Jupyter Extension Version: 2023.1.2010391206. Python Extension Version: 2023.2.0. Workspace folder $$$$ User belongs to experiment group 'jupyterTest' User belongs to experiment group 'jupyterEnhancedDataViewer' info 11:00:21.908: LSP Notebooks experiment is enabled info 11:00:23.101: Find preferred kernel for $$$$/figs/plot_eb.ipynb with metadata {"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"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.10.6"},"orig_nbformat":4,"vscode":{"interpreter":{"hash":"916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1"}}} & preferred interpreter /bin/python3 info 11:00:23.102: Find preferred kernel for $$$$/figs/plot_eb.ipynb with metadata {"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"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.10.6"},"orig_nbformat":4,"vscode":{"interpreter":{"hash":"916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1"}}} & preferred interpreter /bin/python3 info 11:00:23.581: Find preferred kernel for $$$$/figs/plot_eb.ipynb with metadata {"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"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.10.6"},"orig_nbformat":4,"vscode":{"interpreter":{"hash":"916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1"}}} & preferred interpreter /bin/python3 info 11:00:23.582: Preferred kernel .jvsc74a57bd0916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1./bin/python3./bin/python3.-m#ipykernel_launcher is exact match or top match for non python kernels, (true, [object Object], true, false) info 11:00:23.582: PreferredConnection: .jvsc74a57bd0916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1./bin/python3./bin/python3.-m#ipykernel_launcher found for NotebookDocument: $$$$/figs/plot_eb.ipynb info 11:00:23.592: Find preferred kernel for $$$$/figs/plot_eb.ipynb with metadata {"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"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.10.6"},"orig_nbformat":4,"vscode":{"interpreter":{"hash":"916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1"}}} & preferred interpreter /bin/python3 info 11:00:23.839: Preferred kernel .jvsc74a57bd0916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1./bin/python3./bin/python3.-m#ipykernel_launcher is exact match or top match for non python kernels, (false, [object Object], true, false) info 11:00:23.839: PreferredConnection: .jvsc74a57bd0916dbcbb3f70747c44a77c7bcd40155683ae19c65e1c03b4aa3499c5328201f1./bin/python3./bin/python3.-m#ipykernel_launcher found for NotebookDocument: $$$$/figs/plot_eb.ipynb info 11:00:25.285: Process Execution: > /bin/python3 -m pip list > /bin/python3 -m pip list