Created an environment with python 3.5 but info shows the pyhton version is 3.12

I created a python environment with the following command:
conda create -n NCRE python=3.5

But after I created it, I check the env with the command:
conda info

And it shows python version is 3.12.4.final.0

So why it is not python 3.5 as I specified?

Good question ljr080808 and welcome to the community. This is expected behavior, so I’ll walk you through what’s happening.

First of all, the python version reported by conda info is the version of Python that the conda command itself is using. Why this is the case and why conda runs in a separate environment from the one you just created requires a longer answer, but the summary of it is that you want conda to function predictably and consistently across any environment you create. Having conda run from a separate environment, named base, protects conda and you from potentially breaking/impacting your conda setup with a new environment you create.

In order to see what version of python is in the active environment , you can use the conda list command to show what packages (including python) are installed in the current active environment, or you can just run python --version which should output the version of Python in your environment.

One more note I want to highlight is that I keep saying the word active in the paragraph before. You must activate a conda environment to use it (conda activate <envname>). Once activated you will be using the Python version, packages, and other binaries specified in that environment. You can generally see which environment is active with the conda info command (first item in the output) or depending on your terminal/prompt, it should be displayed in parentheses to the left of your prompt .

Hopefully that helps. If you have additional questions, please feel free to ask.