{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreiabd4nkbyvuvmf7mw2suxpglkur7igbav5jwx74isusv3whwdrj6m",
"uri": "at://did:plc:nag2oldw2cdjruz3dtaxj52d/app.bsky.feed.post/3mjuy3oh3no62"
},
"path": "/en/blog/2019/usar-anaconda-python-en-git-bash/",
"publishedAt": "2026-04-18T05:00:00.000Z",
"site": "https://www.cosmoscalibur.com",
"tags": [
"Git",
"Bash",
"Anaconda",
"Miniconda"
],
"textContent": "Recently, for work reasons I have had to work on Windows and that is why I had the need to look for a comfortable option to use Git on Windows, with support from Bash to which I am accustomed in Linux and with Python Anaconda recognized. Somehow, the minimum version of how to use Windows without dying trying.\n\n## Anaconda Python\n\nThe first thing is to proceed to install Anaconda Python from its official site, but I recommend first reviewing the real need to have everything included in Anaconda or use something minimalist like Miniconda. Anaconda will represent an installation and download of almost 500 MB, and therefore a longer time in both steps. On the other hand, Miniconda only installs the minimum required to have Python and the Conda package manager. This last option is recommended if you have little disk space, want to install quickly, only want to test the basics of Python or the equipment has low specs (I remember cases in which my students—when I was a teacher—the mere installation of Anaconda would freeze the computer and restart it).\n\nIf you use Anaconda for your development projects and use good practices, you will surely be used to using environments and in that case you do not need to have so many things in the base environment, Miniconda being a good option as well.\n\nDownload Anaconda or Miniconda according to your need and install like any Windows program. The important thing during the installation is to indicate that it is only for the current user and that the `PATH` is not associated. Following this advice will avoid headaches in the future.\n\nUpdated on 2020-07-02\n\nTo know more details about the installation process you can consult my post Install Anaconda Python.\n\n## Git Bash\n\nAlthough you can download it from the project site, we will take advantage of the Conda manager to facilitate the download, installation, and configuration task.\n\nWe will open Anaconda PowerShell or Anaconda Prompt, and we will execute the following:\n\n\n conda create -n gitbash -c conda-forge git=2.24.0\n\nThe use of `-c conda-forge` is important because the version of Git that we will use will come from this channel. If the default channel is used, only the console client is installed, while in this option Git Bash is included. I have also indicated `-n gitbash` to avoid possible conflicts between the packages required to use Git and the packages available in the base environment. In a later post I will talk about Conda to go deeper into this.\n\nOnce the installation is finished, you can open the Windows menu and look for Git Bash, which will already have Conda recognized. Now you just have to start using it, `conda activate base`.\n\nNota\n\nAt this time, our default environment will be gitbash. If you install without indicating the environment, you will have the base environment enabled by default but with possible conflicts.\n\nAnd what happens if we already had Git Bash installed? Git Bash supports the typical Bash files, like `bashrc`. Thus, we can use the configuration that is usually used in Linux.\n\nWe open Git Bash, and we execute:\n\n\n cd $HOME echo \". /c/Users/USER/ANACONDA/etc/profile.d/conda.sh\" >> .bashrc source .bashrc\n\nWith the first line we make sure to go to the user’s directory. In the second line, we will create or edit the configuration file, but you must replace `USER` with your user’s folder and `ANACONDA` with the Anaconda folder (usually `Anaconda3` or `Miniconda3` if you used Miniconda). The third line updates the configuration in the current console session allowing Conda to be used immediately. For the next time you open Git Bash you will no longer have to configure anything, just start using Conda (there is still no activated environment).\n\n* * *\n\n_This article was originally published in Spanish on 2019-12-31._",
"title": "Use Anaconda Python in Git Bash",
"updatedAt": "2026-04-18T05:00:00.000Z"
}