-
Notifications
You must be signed in to change notification settings - Fork 325
Sitting at "Discovering Python Interpreters" every reload #12974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Things I have tried to do based on previous issues and internet related research:
|
@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.
|
Please could you enable verbose logging for Jupyter and Python extensions as follows
|
Hi @DonJayamanne
Maybe there is additional time being lost here as well. Thanks for your help. Output for
|
this code is async, hence will not block the discover of kernels 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 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: 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
The text was updated successfully, but these errors were encountered: