{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreigjeoecvu65jmf6vzkdkhmfin4rvpa4todtwirwloqxceuwf27cyy",
"uri": "at://did:plc:nag2oldw2cdjruz3dtaxj52d/app.bsky.feed.post/3mjuy4qrssdl2"
},
"path": "/en/blog/2020/instalar-python-anaconda/",
"publishedAt": "2026-04-18T05:00:00.000Z",
"site": "https://www.cosmoscalibur.com",
"tags": [
"miniconda",
"Anaconda Python",
"Installing in silent mode",
"UnboundLocalError: local variable “DISTRO_NAME” referenced before assignment",
"Installing on Windows"
],
"textContent": "In recent years, a tool has become popular not only as a base for the data analytics ecosystem («data science» as some also call it) but also generally for Python development (scientific, web, or general purpose). This tool is Anaconda, which not only provides us with a cross-platform package distribution system, a main repository with broad cross-platform support (_default_ or _anaconda_ channel) but also an environment manager to allow isolating our dependencies, facilitating reproducibility and avoiding conflicts.\n\n## Get installer\n\nOur first step is to obtain the Anaconda Python installer according to our operating system, installation mode, and storage space or bandwidth limitation. Although Anaconda still has installers for Python 2.7, I do not recommend their use but rather the versions associated with Python 3.X (Python 2 lost support on December 31, 2019).\n\nIf we have storage space or bandwidth limitations, we can use the installer for miniconda, which corresponds to an installer of around 60 MB on the 3 operating systems. This installer gives us greater control over the installed packages, and only includes by default what is necessary for the Python interpreter and the Conda manager.\n\nIf we want a collection of packages ready to use, we will go to the Anaconda Python installer (we select _Download Anaconda_). Now we go to the installers section (_Anaconda Installers_) and we will choose the one according to our need:\n\n * 32 and 64-bit graphical installer for Windows.\n\n * Command-line installer for Windows (64-bit).\n\n * Graphical and command-line installer for Mac (64-bit).\n\n\n\n\nThis download is around 500 MB for all cases.\n\n## Command line installation\n\nCommand-line installation applies in the same way for both Mac and Linux, both using an installer based on bash code (regardless of whether it is Anaconda or Miniconda).\n\nFor this case we will rely on silent installation [cmd-en] to avoid interactive questions and thus not worry during the installation. We invoke the installer with Bash as follows (make sure to use the full and correct path of the `sh` installer you will use).\n\n\n bash Anaconda3-2020.02-Linux-x86_64.sh -b -p $HOME/anaconda echo \". $HOME/anaconda/etc/profile.d/conda.sh\" >> $HOME/.bashrc source $HOME/.bashrc\n\nIn the Bash invocation, the `-b` argument implies the acceptance of licenses and with `-p` we indicate the path for the Anaconda installation (you can change it to your desire).\n\nThe second and third lines are specific if you use a Bash console. This allows the Conda manager to be recognized by the console when a new session is started and the last line applies it for the current session.\n\nAlthough it is not my preference and can also generate potential conflicts, if you want the Anaconda Python environment to be activated by default you can add the line `conda activate` to the `.bashrc`.\n\nThe version of _Anaconda Navigator_ included in 2020.02 on Linux has a bug, so if when executing it you see the message `UnboundLocalError: local variable 'DISTRO_NAME' referenced before assignment` it will be enough to update the package [navigator-en].\n\n\n conda update anaconda-navigator\n\n## Graphical installation\n\nInstallation on Windows with the graphical installer [gui-en] is simple. The default options are exactly the recommended ones, so it is only necessary to click « _Next_ » every time.\n\nIt is strongly recommended to use the installation with the default options, to avoid future conflicts. That is, install « _Just Me_ » so as not to require administrator permissions, do not add to the `PATH` (to avoid conflicts with programs that make use of Python or other packages included in Anaconda), and register Anaconda Python as the default Python (so it will be recognized by code editors that detect Anaconda).\n\nFor the graphical installation on Mac you can also follow the default options.\n\n## Verify installation\n\nValidating the list of included packages is enough to know that Anaconda works properly. We open the Bash console (Linux or Mac) or _Anaconda Prompt_ (Windows, or opening _Anaconda Navigator_ is enough), and we execute `conda list`. If we observe the list of packages, it works.\n\n## References\n\n[cmd-en]\n\nInstalling in silent mode. conda.\n\n[navigator-en]\n\nUnboundLocalError: local variable “DISTRO_NAME” referenced before assignment. Anaconda issues.\n\n[gui-en]\n\nInstalling on Windows. Anaconda.\n\n* * *\n\n_This article was originally published in Spanish on 2020-06-29._",
"title": "Install Anaconda Python",
"updatedAt": "2026-04-18T05:00:00.000Z"
}