question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Selected python interpreter is not used in terminal window

See original GitHub issue

I have two interpreters to use, both installed in global locations

image

I have the Python 3.9 one selected (as it also shows in the interpreter at the bottom left).

If I create a new terminal window, it uses the 3.8 one:

D:\Source\jupyter_server>python
Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>          

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
karthiknadigcommented, Oct 19, 2020

You are correct. People have filed bugs about this. The point of picking interpreters is to run the tools linter, formatter, debugger, intellisense, etc using the selected interpreter. The terminal represents how you have your system configured.

We do have a long term plan to solve this. It is not as straight forward as you would think. for example, pyenv using python shim, and figures out which version to run for each folder by looking at pyenv settings in that folder. People could have set an alias to python, so if we change what python means by changing just PATH that won’t work. In short we have thought about this problem, and we plan on tackling it. But for now, the terminal works like how it is configured for your machine (i.e, selecting a python is VS Code, does not change your machine configuration.)

1reaction
rchiodocommented, Oct 19, 2020

No, we don’t control this.

Seems like a user may not understand this. What’s the point of allowing me to pick the two interpreters then?

Read more comments on GitHub >

github_iconTop Results From Across the Web

My Visual Studio Code is not using the Python interpreter that I ...
Solution: We can use the shortcut key Ctrl+Shift+` (or you can also click "Terminal", "New Terminal") to open a new VSCode terminal, and...
Read more >
Configure a Python interpreter | PyCharm Documentation
Press Ctrl+Alt+S to open the IDE settings and select Project <project name> | Python Interpreter. · Expand the list of the available interpreters ......
Read more >
Using Python environments in VS Code
By default, any Python interpreter installed runs in its own global environment. They aren't specific to a particular project. For example, if you...
Read more >
2. Using the Python Interpreter — Python 3.11.1 documentation
Invoking the Interpreter: The Python interpreter is usually installed as/usr/local/bin/python3.11 on those machines where it is available; ...
Read more >
VSCode can't select interpreter - Python Forum
If you forgot to close terminal window from previous session, close now. Select the python interpreter for current session. Now, only after ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found