Which python executable does the pixi pick? #1931
-
I'm on macOS and new to the pixi. I have system python, pythons from pyenv and anaconda. Under my project folder, if I run python directly, I got an error from pyenv:
It is OK because usually I either use conda to create a virtualenv, or setup pyenv correctly then use pdm/poetry to create virtualenv . However, when I run pixi, it automatically used python 3.11 and all works. I am just curious, how pixi determines which python to use for the project? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Depending on whether you use a pyproject or pixi.toml we read the requirement differently. With a pyproject.toml we read the requires-python field and use that as the requirement for python. For a pixi.toml you have to define a requirement on the python package. You then probably have something a python requirement that looks something like You could also have a requirement like I hope that answers your question? |
Beta Was this translation helpful? Give feedback.
Its installed as part of the environment! If you use the defaults you get it from conda-forge. We hardcoded the 3.11 requirement, it has nothing to do with your system python.