Skip to main content
Jun 24, 2021 10:09 AM UTC
Question

Miniconda Git directories in environment variables don't exist

Hello

It looks like Git environment variables which are set by default miniconda installation don't exist:
GIT_EXEC_PATH=/conda_dir/libexec/git-core
GIT_TEMPLATE_DIR=/conda_dir/share/git-core/templates

but we have it in Git pkgs directory:
GIT_EXEC_PATH=/conda_dir/pkgs/git-2.26.2-pl524_78/libexec/git-core
GIT_TEMPLATE_DIR=/conda_dir/pkgs/git-2.26.2-pl524_78/share/git-core/templates

What are the best practices for this?
Do we need to set up this variables manually to pkgs directories or create empty directories in conda_dir?

Regards
Darek

    1 reply

    Vladimir Ein
    Rocketeer
    Jun 24, 2021 4:04 PM UTC
    Hello

    It looks like Git environment variables which are set by default miniconda installation don't exist:
    GIT_EXEC_PATH=/conda_dir/libexec/git-core
    GIT_TEMPLATE_DIR=/conda_dir/share/git-core/templates

    but we have it in Git pkgs directory:
    GIT_EXEC_PATH=/conda_dir/pkgs/git-2.26.2-pl524_78/libexec/git-core
    GIT_TEMPLATE_DIR=/conda_dir/pkgs/git-2.26.2-pl524_78/share/git-core/templates

    What are the best practices for this?
    Do we need to set up this variables manually to pkgs directories or create empty directories in conda_dir?

    Regards
    Darek
    Hello Dariusz,

    The directory /conda_dir/pkgs is a place where conda keeps a cache of the packages it downloads and installs. It's not intended for direct use by the end user. Files that you see in that directory are not a completely installed product.

    One of the benefits of conda is that you don't need to set up variables manually - conda does that for you. To use Git, you need to install it into a conda environment. When you activate that environment, GIT_EXEC_PATH and GIT_TEMPLATE_DIR will be configured automatically by conda.

    Installation typically looks like this:

    conda create -n my-tools git
    conda activate my-tools

    or like this (if the environment my-tools already exists):

    conda activate my-tools
    conda install git

    Please refer to official conda documentation at conda.io for more info about these commands.

    Regards,
    Vladimir