Anaconda
Anaconda provides a command-line utility called conda
for installing and managing different versions of the Python programming language and third-party packages.
Anaconda is a package manager, an environment manager, a Python/R data science distribution, and a collection of over 1,500+ open source packages. Anaconda is free and easy to install, and it offers free community support. - Anaconda website
Resources:
Detection
To check to see if Anaconda is already installed:
Detection on Mac
On a Mac, you can invoke these commands directly in the Terminal.
Detection on Windows
However, on Windows, you can alternatively search for the "Anaconda Prompt" application to know whether or not you have it installed.
After the Anaconda Prompt is installed, you can invoke conda
commands from within it:
If Anaconda is installed the way we need it to be, we should also be able to invoke conda
commands from within the Git Bash console:
If Git Bash doesn't recognize your conda
commands, you might have to uninstall Anaconda and when re-installing it, make sure to check the "Add Anaconda to my PATH environment variable" option (see installation instructions below).
Installation
If not yet installed, download Anaconda Version 3.7 for either Mac or Windows.
NOTE: This might take a while, so prefer to do it over a strong WiFi connection. And feel free to ignore any email capture forms which may pop up afterwards.
After the download has finished, run the installer program and accept all the default options, except for this important exception to "Add Anaconda to my PATH environment variable", which will allow other programs like Git Bash to recognize the Anaconda installation:
The installation will take a few minutes to complete.
NOTE: After installing Anaconda on a Mac, you will need to restart your terminal for the changes to take effect.
After the installation is complete, try repeating the detection commands again, as described in the section above.
Once you are able to successfully detect your installation of Anaconda, you are ready to proceed!
NOTE: On Windows, you may need to run the command
conda init bash
when prompted to do so, in order to activate a virtual environment for the first time.
Usage
The conda
Utility
conda
UtilityView a list of existing virtual environments:
Create a new virtual environment, and name it something like "my-first-env":
Enter into, or "activate", the virtual environment:
After activating the environment, you should be able to detect and use its installations of Python and Pip:
For more information, see notes on the python
utility and the pip
utility.
Last updated