Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to pick python 3.11 as a conda environment in vs code

I am just start using vscode to write python code. And I am normally using conda as my package and environment tool.

I am trying to create a conda environment for python 3.11 in my project directory based on the instruction in the vscode official document https://code.visualstudio.com/docs/python/environments.

However, it only list python 3.7 - 3.10 as the python version I could choose.

I am wondering how could I pick python 3.11 in the conda environment?

I am using an Intel 2019 macbook pro. I already installed python3.11 through homebrew from command line. And I have also installed miniconda and created a python 3.11 environment through command line. However, when I tried to create .conda environment in vscode

Screenshot to create python environment

Screenshot to select python interpreter version for conda environment

It only show python 3.7 - 3.10

like image 418
Wenhao Xu Avatar asked Nov 28 '25 06:11

Wenhao Xu


1 Answers

This problem is related to conda, but it's not a vscode problem. You can create a conda environment with the following command,

conda create --name myenv -c conda-forge python=3.11

Then select the created conda interpreter in the Select Interpreter panel.

enter image description here

More information on conda commands.

like image 84
JialeDu Avatar answered Nov 29 '25 21:11

JialeDu



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!