Selected python interpreter is not used in terminal window
See original GitHub issueI have two interpreters to use, both installed in global locations
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:
- Created 3 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.)Seems like a user may not understand this. What’s the point of allowing me to pick the two interpreters then?