Skip to content
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

Testing MRU kernel picker- asks me to install python #172304

Closed
andreamah opened this issue Jan 24, 2023 · 8 comments
Closed

Testing MRU kernel picker- asks me to install python #172304

andreamah opened this issue Jan 24, 2023 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster notebook-kernel-picker

Comments

@andreamah
Copy link
Contributor

Testing #172094

I have python on my computer, but the kernel selector isn't detecting it and tries to get me to get it from the windows store (I think I originally got it from the python website?)

Image from Gyazo

@andreamah
Copy link
Contributor Author

Follow-up- I re-installed the extensions and it still told me to Install Python in the pick, but I refreshed and it showed my interpreter? Not too sure why.

@DonJayamanne
Copy link
Contributor

@andreamah
Please could you try to repro this and share the following logs
Please could you enable logging as follows:

  • Open settings & go into Jupyter->Logging
  • Change the value to verbose
  • Reload VS Code,
  • Attempt to repro the issue & then copy the output from the Jupyter output panel.

@DonJayamanne DonJayamanne added bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster notebook-kernel-picker labels Jan 24, 2023
@DonJayamanne
Copy link
Contributor

Its possible the Python environments were still being refreshed (Python env takes a while to discover the Python environments)

@DonJayamanne
Copy link
Contributor

Possible solution: Jupyter ext might want to display the Install Python option only after Python has completed its refresh

@andreamah
Copy link
Contributor Author

output

debug 15:09:21.662: Get Active Interpreter, Class name = ls (started execution), Arg 1: "/c:/Users/andreamah/Documents/for-testing/deep-learning-with-python-notebooks/chapter02_mathematical-building-blocks.ipynb"
debug 15:09:21.663: Get Active Interpreter, Class name = ls, completed in 1ms, has a truthy return value, Arg 1: "/c:/Users/andreamah/Documents/for-testing/deep-learning-with-python-notebooks/chapter02_mathematical-building-blocks.ipynb", Return Value: {"id":"C:\\USERS\\ANDREAMAH\\APPDATA\\LOCAL\\PROGRAMS\\PYTHON\\PYTHON310\\PYTHON.EXE","sysPrefix":"C:\\Users\\andreamah\\AppData\\Local\\Programs\\Python\\Python310","displayPath":{"$mid":1,"path":"/C:/Users/andreamah/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\\Users\\andreamah\\AppData\\Local\\Programs\\Python\\Python310\\python.exe","_sep":1,"path":"/C:/Users/andreamah/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":5,"raw":"3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 16:14:13) [MSC v.1929 64 bit (AMD64)]"}}

You might also be able to repro by creating a new settings profile and then installing the extensions from the Select Kernel menu. That's how I was able to repro.

@andreamah
Copy link
Contributor Author

andreamah commented Jan 24, 2023

Note that, when I was in that state, pressing the refresh button showed me the correct stuff and set the correct interpreter. Logs when I refreshed:

debug 15:10:25.984: Get Active Interpreter, Class name = ls (started execution), Arg 1: "/c:/Users/andreamah/Documents/for-testing/deep-learning-with-python-notebooks/chapter02_mathematical-building-blocks.ipynb"
debug 15:10:25.986: Get Active Interpreter, Class name = ls, completed in 2ms, has a truthy return value, Arg 1: "/c:/Users/andreamah/Documents/for-testing/deep-learning-with-python-notebooks/chapter02_mathematical-building-blocks.ipynb", Return Value: {"id":"C:\\USERS\\ANDREAMAH\\APPDATA\\LOCAL\\PROGRAMS\\PYTHON\\PYTHON310\\PYTHON.EXE","sysPrefix":"C:\\Users\\andreamah\\AppData\\Local\\Programs\\Python\\Python310","displayPath":{"$mid":1,"path":"/C:/Users/andreamah/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\\Users\\andreamah\\AppData\\Local\\Programs\\Python\\Python310\\python.exe","_sep":1,"path":"/C:/Users/andreamah/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":5,"raw":"3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 16:14:13) [MSC v.1929 64 bit (AMD64)]"}}
debug 15:10:28.818: Listing Python kernels for Interpreter ~\AppData\Local\Programs\Python\Python310\python.exe
debug 15:10:28.818: Get Active Interpreter, Class name = ls (started execution), Arg 1: "/c:/Users/andreamah/Documents/for-testing/deep-learning-with-python-notebooks"
debug 15:10:28.821: Get Jupyter Kernel Paths, Class name = Lu, completed in 3ms, has a truthy return value, Arg 1: "", Return Value: 
debug 15:10:28.821: Get KernelSpec root path, Class name = Lu, completed in 3ms, has a truthy return value, Arg 1: {"a":false,"b":null}, Return Value: <Uri:/c:/Users/andreamah/AppData/Roaming/jupyter/kernels>, <Uri:/C:/ProgramData/jupyter/kernels>
debug 15:10:28.822: Get Active Interpreter, Class name = ls, completed in 4ms, has a truthy return value, Arg 1: "/c:/Users/andreamah/Documents/for-testing/deep-learning-with-python-notebooks", Return Value: {"id":"C:\\USERS\\ANDREAMAH\\APPDATA\\LOCAL\\PROGRAMS\\PYTHON\\PYTHON310\\PYTHON.EXE","sysPrefix":"C:\\Users\\andreamah\\AppData\\Local\\Programs\\Python\\Python310","displayPath":{"$mid":1,"path":"/C:/Users/andreamah/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\\Users\\andreamah\\AppData\\Local\\Programs\\Python\\Python310\\python.exe","_sep":1,"path":"/C:/Users/andreamah/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":5,"raw":"3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 16:14:13) [MSC v.1929 64 bit (AMD64)]"}}
debug 15:10:28.833: Not Searching for kernels as path does not exist, c:\Users\andreamah\AppData\Local\Programs\Python\Python310\share\jupyter\kernels
debug 15:10:28.915: Kernel for interpreter C:\USERS\ANDREAMAH\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE is .jvsc74a57bd0e8e6ac00bbe74d34ab35068600adc28d0eaa5df3c0e4e1e2a76a296885753b3b.c:\Users\andreamah\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\andreamah\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher
debug 15:10:28.916: Kernels for interpreter C:\USERS\ANDREAMAH\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE are .jvsc74a57bd0e8e6ac00bbe74d34ab35068600adc28d0eaa5df3c0e4e1e2a76a296885753b3b.c:\Users\andreamah\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\andreamah\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher
debug 15:10:28.916: Found 1 cached controllers
debug 15:10:28.916: Creating 1 controllers
debug 15:10:28.919: Creating notebook controller for startUsingPythonInterpreter & view jupyter-notebook (id='.jvsc74a57bd0e8e6ac00bbe74d34ab35068600adc28d0eaa5df3c0e4e1e2a76a296885753b3b.c:\Users\andreamah\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\andreamah\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher') with name 'Python 3.10.5'
debug 15:10:28.921: Creating notebook controller for startUsingPythonInterpreter & view interactive (id='.jvsc74a57bd0e8e6ac00bbe74d34ab35068600adc28d0eaa5df3c0e4e1e2a76a296885753b3b.c:\Users\andreamah\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\andreamah\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher') with name 'Python 3.10.5'
debug 15:10:28.925: Get Active Interpreter, Class name = ls (started execution), Arg 1: "/c:/Users/andreamah/Documents/for-testing/deep-learning-with-python-notebooks/chapter02_mathematical-building-blocks.ipynb"
debug 15:10:28.925: Updating cache with Python kernels startUsingPythonInterpreter:'.jvsc74a57bd0e8e6ac00bbe74d34ab35068600adc28d0eaa5df3c0e4e1e2a76a296885753b3b.c:\Users\andreamah\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\andreamah\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher (interpreter id = C:\USERS\ANDREAMAH\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE)'
, Added = startUsingPythonInterpreter:'.jvsc74a57bd0e8e6ac00bbe74d34ab35068600adc28d0eaa5df3c0e4e1e2a76a296885753b3b.c:\Users\andreamah\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\andreamah\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher (interpreter id = C:\USERS\ANDREAMAH\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE)'
, Updated = 
, Removed = 
debug 15:10:28.931: Get Active Interpreter, Class name = ls, completed in 6ms, has a truthy return value, Arg 1: "/c:/Users/andreamah/Documents/for-testing/deep-learning-with-python-notebooks/chapter02_mathematical-building-blocks.ipynb", Return Value: {"id":"C:\\USERS\\ANDREAMAH\\APPDATA\\LOCAL\\PROGRAMS\\PYTHON\\PYTHON310\\PYTHON.EXE","sysPrefix":"C:\\Users\\andreamah\\AppData\\Local\\Programs\\Python\\Python310","displayPath":{"$mid":1,"path":"/C:/Users/andreamah/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\\Users\\andreamah\\AppData\\Local\\Programs\\Python\\Python310\\python.exe","_sep":1,"path":"/C:/Users/andreamah/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":5,"raw":"3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 16:14:13) [MSC v.1929 64 bit (AMD64)]"}}
debug 15:10:28.946: Full interpreter list after refreshing (total 0ms, resolve 0ms, refresh 0ms) is length: 1, C:\USERS\ANDREAMAH\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE:undefined::c:\Users\andreamah\AppData\Local\Programs\Python\Python310\python.exe:C:\Users\andreamah\AppData\Local\Programs\Python\Python310\python.exe
debug 15:10:28.947: Python environment for C:\USERS\ANDREAMAH\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE is C:\USERS\ANDREAMAH\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE from Python Extension API is {"internal":{"path":"C:\\Users\\andreamah\\AppData\\Local\\Programs\\Python\\Python310\\python.exe","id":"C:\\USERS\\ANDREAMAH\\APPDATA\\LOCAL\\PROGRAMS\\PYTHON\\PYTHON310\\PYTHON.EXE","executable":{"uri":{"$mid":1,"fsPath":"c:\\Users\\andreamah\\AppData\\Local\\Programs\\Python\\Python310\\python.exe","_sep":1,"path":"/C:/Users/andreamah/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"bitness":"64-bit","sysPrefix":"C:\\Users\\andreamah\\AppData\\Local\\Programs\\Python\\Python310"},"version":{"major":3,"minor":10,"micro":5,"release":{"level":"final","serial":0},"sysVersion":"3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 16:14:13) [MSC v.1929 64 bit (AMD64)]"},"tools":[]},"id":"C:\\USERS\\ANDREAMAH\\APPDATA\\LOCAL\\PROGRAMS\\PYTHON\\PYTHON310\\PYTHON.EXE"} and translated is {"id":"C:\\USERS\\ANDREAMAH\\APPDATA\\LOCAL\\PROGRAMS\\PYTHON\\PYTHON310\\PYTHON.EXE","sysPrefix":"C:\\Users\\andreamah\\AppData\\Local\\Programs\\Python\\Python310","displayPath":{"$mid":1,"path":"/C:/Users/andreamah/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"envName":"","uri":{"$mid":1,"fsPath":"c:\\Users\\andreamah\\AppData\\Local\\Programs\\Python\\Python310\\python.exe","_sep":1,"path":"/C:/Users/andreamah/AppData/Local/Programs/Python/Python310/python.exe","scheme":"file"},"displayName":"","envType":"Unknown","version":{"major":3,"minor":10,"patch":5,"raw":"3.10.5 (tags/v3.10.5:f377153, Jun  6 2022, 16:14:13) [MSC v.1929 64 bit (AMD64)]"}}
debug 15:10:28.947: Full interpreter list is length: 1, C:\USERS\ANDREAMAH\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE::Unknown:c:\Users\andreamah\AppData\Local\Programs\Python\Python310\python.exe
debug 15:10:28.948: Refreshed Environments
debug 15:10:28.965: Updating cache with Python kernels startUsingPythonInterpreter:'.jvsc74a57bd0e8e6ac00bbe74d34ab35068600adc28d0eaa5df3c0e4e1e2a76a296885753b3b.c:\Users\andreamah\AppData\Local\Programs\Python\Python310\python.exe.c:\Users\andreamah\AppData\Local\Programs\Python\Python310\python.exe.-m#ipykernel_launcher (interpreter id = C:\USERS\ANDREAMAH\APPDATA\LOCAL\PROGRAMS\PYTHON\PYTHON310\PYTHON.EXE)'
, Added = 
, Updated = 
, Removed = 
debug 15:10:29.952: End refreshing Kernel Picker (1674601732592)

@DonJayamanne
Copy link
Contributor

rofile and then installing the extensions from the Select Kernel menu. That's how I was able to repro.

Oh so you install the Python extension from Select Kernel menu, isn't that right. If i'm not mistaken, you then end up with the stable version of Pytohn extension.

Please could you install the latest pre-release version of both Pytohn and Jupyter extensions and then replicate this issue.
If you can, then please feel free to re-open this issue.

Closing as i suspect you had the stable version of Python installed.

@andreamah
Copy link
Contributor Author

Hmm, I tried to repro again with installing python + jupyter from the same way, but I'm getting the prerelease (not sure what I was getting before) and it's working just fine, which is strange. I'll reopen this if I see it again.

@github-actions github-actions bot locked and limited conversation to collaborators Mar 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster notebook-kernel-picker
Projects
None yet
Development

No branches or pull requests

3 participants