Git Product home page Git Product logo

Comments (6)

e-khurmamatov avatar e-khurmamatov commented on August 18, 2024 2

conda and miniconda already support configuration files in the following directories (as described in conda/conda#10982 and conda documentation):

  • '$XDG_CONFIG_HOME/conda/.condarc',
  • '$XDG_CONFIG_HOME/conda/condarc',
  • '$XDG_CONFIG_HOME/conda/condarc.d/',
  • '~/.config/conda/.condarc',
  • '~/.config/conda/condarc',
  • '~/.config/conda/condarc.d/'

The only issue is ~/.conda/environments.txt (as mentioned in conda/conda#8804).

conda.json might be updated accordingly.

from xdg-ninja.

jrom99 avatar jrom99 commented on August 18, 2024 1

Hello, to update here, there is another file that is created by conda: aau_token (conda/conda#13453 (comment)).

from xdg-ninja.

b3nj5m1n avatar b3nj5m1n commented on August 18, 2024

Hi! I don't use this myself, so I didn't have the chance to try it out when I went through the arch wiki article.

According to that, the following files exist:

  • ~/.conda/.condarc
  • ~/.conda/condarc
  • ~/.conda/condarc.d/
  • ~/.condarc

And the suggested solution is the following export:

export CONDARC="$XDG_CONFIG_HOME/conda/condarc"

It's unclear to me if this will move just the rc file, or the directory as well, and what role the rc files in the directory play.

If you could give me some insight, that would be great!

from xdg-ninja.

mxmlnkn avatar mxmlnkn commented on August 18, 2024

For testing, you can install miniconda.

The ~/.condarc file is created by conda config. E.g., try:

> conda config --show-source
==> /home/user/.condarc <==
anaconda_upload: False

> mkdir $XDG_CONFIG_HOME/conda
> cp ~/.condarc "$XDG_CONFIG_HOME/conda/condarc"
> CONDARC="$XDG_CONFIG_HOME/conda/condarc" conda config --show-source
==> /home/user/.config/conda/condarc <==
anaconda_upload: False

==> /home/user/.condarc <==
anaconda_upload: False

> cp ~/.condarc ~/.conda/condarc
> CONDARC="$XDG_CONFIG_HOME/conda/condarc" conda config --show-source
==> /home/user/.config/conda/condarc <==
anaconda_upload: False

==> /home/user/.conda/condarc <==
anaconda_upload: False

==> /home/user/.condarc <==
anaconda_upload: False

It's unclear to me if this will move just the rc file, or the directory as well, and what role the rc files in the directory play.

~/.conda/condarc is only yet another alternative path for condarc.

The linked list of alternative paths suggest to me that CONDARC only affects the condarc file. For the .conda folder, CONDA_ROOT would have to be set. But from the documentation it seems that conda is automatically looking inside $XDG_CONFIG_HOME/conda/ first. Simply moving ~/.conda there and moving ~/.condarc into ~/.conda/condarc should work.

> mv ~/.conda "$XDG_CONFIG_HOME/conda"
> conda config --show-source
==> /home/user/.config/conda/condarc <==
anaconda_upload: False
> conda config --set anaconda_upload true
> conda config --show-source
==> /home/user/.config/conda/condarc <==
anaconda_upload: False

==> /home/user/.condarc <==
anaconda_upload: True

> export CONDARC="$XDG_CONFIG_HOME/conda/condarc"
> export CONDA_ROOT="$XDG_CONFIG_HOME/conda"
> rm ~/.condarc
> conda config --set anaconda_upload true
> conda config --show-source

==> /home/user/.config/conda/condarc <==
anaconda_upload: False

==> /home/user/.condarc <==
anaconda_upload: True

As the above log shows, I am unable to make miniconda use the XDG path when changing settings. Reading from XDG paths does not seem to be a problem but neither CONDARC nor CONDA_ROOT environment variables seem to work for conda config --set. Maybe I'm doing something wrong, maybe it is a bug.

from xdg-ninja.

b3nj5m1n avatar b3nj5m1n commented on August 18, 2024

@mxmlnkn Thank you for the write-up, I don't have the time to properly look into this at the moment, so I'll just add conda as being unsupported and link to this issue. (5e208d2)

If you, or anyone else, finds a way to make conda respect XDG, please create a PR or let me know!

from xdg-ninja.

utkarshgupta137 avatar utkarshgupta137 commented on August 18, 2024

There is already an issue: conda/conda#8804

from xdg-ninja.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.