Conda : Cannot install xonsh wrapper without a python interpreter in prefix: /home/darkuni/.conda

Hey guys i am trying to init coda for my python development however i tried many solutions can’t get the source of the issue

➜  ~ conda init 
WARNING: Cannot install xonsh wrapper without a python interpreter in prefix: /home/darkuni/.conda
WARNING: Cannot install xonsh wrapper without a python interpreter in prefix: /home/darkuni/.conda
no change     /home/darkuni/.conda/condabin/conda
no change     /home/darkuni/.conda/bin/conda
no change     /home/darkuni/.conda/bin/conda-env
no change     /home/darkuni/.conda/bin/activate
no change     /home/darkuni/.conda/bin/deactivate
no change     /home/darkuni/.conda/etc/profile.d/conda.sh
no change     /home/darkuni/.conda/etc/fish/conf.d/conda.fish
no change     /home/darkuni/.conda/shell/condabin/Conda.psm1
no change     /home/darkuni/.conda/shell/condabin/conda-hook.ps1
no change     /home/darkuni/.conda/etc/profile.d/conda.csh
no change     /home/darkuni/.conda/condabin/conda
no change     /home/darkuni/.conda/bin/conda
no change     /home/darkuni/.conda/bin/conda-env
no change     /home/darkuni/.conda/bin/activate
no change     /home/darkuni/.conda/bin/deactivate
no change     /home/darkuni/.conda/etc/profile.d/conda.sh
no change     /home/darkuni/.conda/etc/fish/conf.d/conda.fish
no change     /home/darkuni/.conda/shell/condabin/Conda.psm1
no change     /home/darkuni/.conda/shell/condabin/conda-hook.ps1
no change     /home/darkuni/.conda/etc/profile.d/conda.csh
no change     /home/darkuni/.bashrc
No action taken.

How are you installing conda and xonsh?
We need enough information so that we can replicate your setup

my config:

 environment.systemPackages = with pkgs; [
  #  vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
    git
    wget
    vscode
    spotify
    go
    nodejs_22
    bun
    rustc
    rustup
    postgresql
    mariadb
    mysql84
    dbeaver-bin
    postman
    conda
    python3
    docker
    docker-compose
    google-chrome
    chromium
    firefox
    tor-browser
    sqlite
    zsh
    oh-my-zsh
    oh-my-git
    pkgs.gnome-tweaks
    gnome-extension-manager
    gedit
    stacer
    pkgs.gnome-disk-utility
    obs-studio
    discord
    vlc
    mpv
    gparted
    mongodb-ce
    slack
    jetbrains-mono
    tmux
    redis
    pkgs.gnome-boxes
    telegram-desktop
    btop
    htop
    backblaze-b2
    python312Packages.pip
    libgcc
    gnumake
    libwebp
    gcc
    chromium
    unzip
    deno
    python311Packages.conda
    xonsh
  ];

I don’t know enough about this but…

Mixing things I suspect is the issue.
e.g. having python312Packages.pip and python311Packages.conda - kwwp to the same version of python - I suspect pythonPackages is the one to use - this will also match the python version in xonsh and python

As for the actual error - I think this is because xonsh does not install a bare xonsh python package it installed an executable xonsh. In my config I use an overlay to load python packages into xonsh - so xonsh loads via nix only.

1 Like

i doubt this is the reason, so i removed the package named conda and installed instead python312Packages.conda. I kept two versions of python:

python3 (which translates to the latest version)
python311

and this works suprisingly. Thanks