简体   繁体   中英

How can I set the latest python interpreter

I have many python versions installed. I need nevertheless that when using VSC the script be run by python3.10.7 . I changed accordingly the interpreter in VSC to the latest python version. The latest python version, python3.10.7 , is installed in the folder /user/bin , while the one which I get with which python is installed in a different folder, home/myname/anaconda3/bin/python . I will appreciate your help. I use Ubuntu 20.4 . I do not have experience in using virtual environments. How do I change the interpreter to the latest one? Thanks for your help.

you can do it by opening the Command Palette using Ctrl+Shift+P and enter Preferences: Open User Settings. Then set python.defaultInterpreterPath, which is in the Python extension section of User Settings, with the appropriate interpreter.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM