#πŸ”’ VSCode terminal not using selected python interpreter for command

30 messages Β· Page 1 of 1 (latest)

quartz apex
#

Hello! I did not know if here was the right place but here I am. Long story short, on my laptop running Linux, I have 2 versions of python (3.7.17 and 3.12.3) my terminal always defaults to 3.12.3 for pip, python3 and python. Does anyone know how to make it use the VSCode Python Extension selected interpreter version? Iv tried ChatGPT but it's no help

grim prismBOT
#

@quartz apex

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

proper forum
#

Give more info please. What distro are you running? I think that there is a plugin of VS Code that lets you switch installs. (I am not sure) I am a PyCharm user.

daring portal
#

ctrl-shift-p

quartz apex
quartz apex
proper forum
#

Yes

#

Yes its a pallette. Search switch or something. I guess its a bug. See the patch notes of vs code. Try updating VS Code.

quartz apex
fading helm
#

You have the correct version at the right bottom corner of the screen and it's not using that?

quartz apex
fading helm
#

Just to be sure, you are opening a new terminal in vscode after selecting the version?

quartz apex
fading helm
#

Click on the "output" tab, select "Python" and check for any errors when changing interpreters

#

Also, what shell are you using?

quartz apex
quartz apex
daring portal
#

close ur terminals im vscode and open a new ome anytime your switch versions..
then do,
which python

daring portal
#

try python3

quartz apex
# daring portal try python3

python3 does not change dependant on interpreter though. python3 always leads to 3.12.3 since the "python3" file is just a link to "python3.12" (Linux Mint does that, changing it messed my whole system up 😍 )

daring portal
#

that says to me your using default system.. here you do python --version to verify..

daring portal
#

read the msg about.. i onno how you installed multiple versions.. but could be borked.. may have to rebuild .. there are tutorials for installing multiple versions...
agai, python3 for u

quartz apex
daring portal
#

maybe go look at yhose folders and see what the structure is.. Im imagining..
/usr/bin/python3.7/bin

grim prismBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.