-
Notifications
You must be signed in to change notification settings - Fork 294
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
Interactive window picking wrong kernel on Linux #3310
Comments
@otaj if you right click on a line and pick run in terminal: And then in that terminal run this code:
Do you get python 3 or python 2? |
|
Your logs indicate we're running the same thing when launching jupyter. Perhaps jupyter's kernel is pointing to the wrong information. In that same terminal, if you run |
|
Can you upload the json for the file at We might be picking the wrong kernel. Can you run this code in the python interactive input box?
That should list out the kernel we're currently connect to. |
|
Hmm. I was hoping it would list out the name. And we don't log the name we picked in our console output. Would you mind renaming the python2/kernel.json to say kernel.tmp, closing VS Code, and trying again? I'm guessing that we're not matching the kernel based on path, so we just pick the first one that has language 'python'. (We match argv[0] on path to see if it's the correct python or not. We don't try just the file name though) Here's an example: On my windows machine, the json has the full path to python in it:
So we can match argv[0] against the python you selected in vs code and pick the kernel based on that. On your linux box I'm guessing we're not finding a match so we just pick the first 'python' kernel. |
Yeah, it is exactly like that. I renamed language to How about you try something like expanding of the first argv[0] by |
We're actually working on the latter. This issue here (once I finish it), should support picking a kernel: This current issue we'll use for fixing the bug of not picking the correct kernel. |
That is great to hear! BTW, definitely out of the scope of this issue or maybe even roadmap, but is there a plan to separate data-science related stuff and python extension? Because right now, that is something that Atom definitely does better. Hydrogen is completely separated from any language-dependent extension and works the same across Haskell, Python, Julia, R, or any other kernels, whereas it would seem that in VSCode, the only place where you can run jupyter kernels is this extension and if you want such functionality with any other language, you are out of luck. I actually enjoy working in VSCode more than in Atom lately, however, because of the lack of the said Jupyter features, I have to have a separate desktop app for that (I loathe programming in a browser) |
Actually the long term goal is to include support for other languages. Not sure how we're going to ship that yet. We might split the datascience stuff into a separate extension, but we need a bunch of the code in the python extension to find/launch jupyter. So yes? But not sure when. This might be a good issue to upvote: |
Environment data
uname -a
:Linux otaj-ntb 5.1.15-zen1-1-zen microsoft/vscode-python#1 ZEN SMP PREEMPT Wed Jun 26 10:06:19 CEST 2019 x86_64 GNU/Linux
"python.jediEnabled"
set to; more info How to update the language server to the latest stable version vscode-python#3977): JediExpected behaviour
When running interactive window with python path set as
/usr/bin/python
(default python, version 3.7.3), I expect interactive window to start python jupyter server, using the same python (python3)Actual behaviour
The extension insists on opening python2 interactive console.
All my python related settings
Steps to reproduce:
Not really sure, whether my machine is somehow misconfigured. I don't have another machine so I cannot test it there. But set python executable to python (which is actually python3) and have an executable python2
Logs
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Nothing related to interactive window
Output from
Console
under theDeveloper Tools
panel (toggle Developer Tools on underHelp
; turn on source maps to make any tracebacks be useful by runningEnable source map support for extension debugging
)The text was updated successfully, but these errors were encountered: