You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python Interactive window does not use the python associated with the current file when starting #3865
Currently we aren't passing the resource: Uri value into most methods.
This would result in various parts of the extension not working correctly in a multi-root environment (current code will pick settings from first available workspace folder).
The problem is what would we pass for the resource? The iPython kernel applies to all open python files. Otherwise we'd have to have multiple kernels running? I guess that's an option too.
That's wrong. The user should be making the decision, not us.
The whole point of integrating with the extension is lost, the user decides what python version is to be used in the current workspace, we should maintain that, we could display a prompt asking them if they would like to change it.
Else we have some major inconsistencies with the, python extension.
changed the title [-]DataScience code needs to make use of `resource` appropriately[/-][+]Python Interactive window does not use the python associated with the current file when starting[/+]on Mar 8, 2019
Opened up a workspace with both folders added to it. Selected envA for a file test.py in A and envB for a file test.py in B. When I did "run selection / line" in test.py in file B instead of using envB it tried to install ipykernel in envA.
Did you verify that the file in B that the environment actually stuck? Seems there's a bug in the base extension where you have to switch back and forth between the files.
Rich Chiodo (@rchiodo) . Good call. I'm pretty darn sure that I had the scenario right, so it was probably that core bug. This time I swapped back and forth a few times and ran both of them in the terminal and it did launch with the correct env this time. Validated.
Activity
rchiodo commentedon Nov 2, 2018
The problem is what would we pass for the resource? The iPython kernel applies to all open python files. Otherwise we'd have to have multiple kernels running? I guess that's an option too.
DonJayamanne commentedon Nov 2, 2018
The uri of the open python file.
Yes, else here's the bug:
But Jupyter is installed, its just that we're using the wrong python interpreter.
rchiodo commentedon Nov 2, 2018
I think we'll have to do something like look at all of the active python files and find the one with jupyter installed in it.
DonJayamanne commentedon Nov 3, 2018
That's wrong. The user should be making the decision, not us.
The whole point of integrating with the extension is lost, the user decides what python version is to be used in the current workspace, we should maintain that, we could display a prompt asking them if they would like to change it.
Else we have some major inconsistencies with the, python extension.
[-]DataScience code needs to make use of `resource` appropriately[/-][+]Python Interactive window does not use the python associated with the current file when starting[/+]rchiodo commentedon Mar 8, 2019
We might also need to allow the user to pick if say they start without opening a file first or even if there are multiple.
ollema commentedon Jun 6, 2019
Is this in the pipeline for some future release? 🙂
rchiodo commentedon Jun 6, 2019
Not at the moment, no. Our 'backlog' or 'inprogress' pipelines are what we're currently working on.
It does have a lot of votes though.
rchiodo commentedon Jun 6, 2019
I'm moving it to New Issues so we triage it again.
ollema commentedon Jun 6, 2019
are these pipelines public? not sure where I can find them
greazer commentedon Jun 6, 2019
To start, let's just make sure we're honoring the active python version on first start of the interactive window.
rchiodo commentedon Jun 6, 2019
Olle Månsson (@ollema) I think you have to install zenhub to see the issues? Not sure.
Here's what it adds for me:

15 remaining items
rchiodo commentedon Feb 5, 2020
Actually this wasn't entirely addressed through #1379. We still don't use the file to pick the environment.
IanMatthewHuff commentedon Feb 25, 2020
This doesn't look resolved to me.
What I did
Folder A
Folder B
Create envA in A and envB in B
Opened up a workspace with both folders added to it. Selected envA for a file test.py in A and envB for a file test.py in B. When I did "run selection / line" in test.py in file B instead of using envB it tried to install ipykernel in envA.
rchiodo commentedon Feb 25, 2020
Did you verify that the file in B that the environment actually stuck? Seems there's a bug in the base extension where you have to switch back and forth between the files.
rchiodo commentedon Feb 25, 2020
For example, what does 'Python: Run in terminal' do?
IanMatthewHuff commentedon Feb 25, 2020
Sorry will report back in just a bit. Having funny issue with my python virtual envs.
IanMatthewHuff commentedon Feb 25, 2020
Rich Chiodo (@rchiodo) . Good call. I'm pretty darn sure that I had the scenario right, so it was probably that core bug. This time I swapped back and forth a few times and ran both of them in the terminal and it did launch with the correct env this time. Validated.