What Anaconda is and why you need it
Anaconda is a package manager and environment tool that bundles Python with hundreds of libraries for data science, machine learning, and scientific computing. Instead of installing Python and then hunting down each library separately, Anaconda gives you Python plus the most common tools — NumPy, Pandas, Jupyter Notebook, Scikit-learn — all at once. It also lets you create separate workspaces (called environments) so different projects can use different versions of the same library without breaking each other.
If you are starting with Python for data work, Anaconda saves hours of setup time. If you are already using Python and keep running into library conflicts, Anaconda solves that problem. The trade-off is that Anaconda takes up more disk space than a bare Python installation — roughly 3 to 5 gigabytes depending on which version you choose.
Key Takeaways
- read the Anaconda installer from anaconda.com, choosing the version for your operating system (Windows, Mac, or Linux) and your processor type (Intel or Apple Silicon for Mac).
- Run the installer and accept the default installation location unless you have a specific reason to change it; the installer will add Anaconda to your system PATH automatically.
- After installation, open a terminal or command prompt and type conda --version to confirm Anaconda is working.
- Create your first environment by typing conda create --name myproject python=3.11, then set up it with conda set up myproject before starting work.
- Use conda install libraryname to add libraries to your active environment without affecting other projects.
Downloading the right installer for your computer
Go to anaconda.com and click the Downloads button. You will see options for Windows, macOS, and Linux. Choose the one that matches your operating system.
If you use a Mac with an Apple Silicon chip (M1, M2, M3, or newer), read the ARM64 version. If your Mac is older and uses an Intel processor, read the Intel version. You can check which processor you have by clicking the Apple menu, selecting About This Mac, and looking at the Chip line. Windows users should read the Windows installer; it works the same way on both Intel and AMD processors.
Anaconda offers two read sizes: the full Anaconda (about 500 MB) and Miniconda (about 50 MB). Anaconda includes Jupyter Notebook and most common libraries built in. Miniconda includes only Python and conda, and you install libraries as you need them. For a first installation, Anaconda is simpler because everything is ready to use when ready.
Installing on Windows
Open the installer file you downloaded (it will be named something like Anaconda3-2024.02-Windows-x86_64.exe). Click Next on the welcome screen. On the License Agreement page, read it and click I Agree.
On the Installation Type page, choose "Just Me" unless you are setting up a shared computer and want all users to have access. Click Next. The installer will suggest a default location like C:\Users\YourName\anaconda3. Leave this as is unless you have a specific reason to change it — for example, if your C: drive is nearly full. Click Next.
On the Advanced Installation Options page, check the box that says "Add Anaconda3 to my PATH environment variable." This step is important because it lets you use conda commands from any folder in your terminal. Click Install and wait for the process to finish. When it is done, click Next and then Finish.
Installing on Mac
Open the installer file you downloaded (it will be named something like Anaconda3-2024.02-MacOSX-arm64.pkg for Apple Silicon or Anaconda3-2024.02-MacOSX-x86_64.pkg for Intel). Double-click it to start the installation. Click Continue on the introduction screen.
Read the license agreement and click Continue, then Agree. The installer will ask where to install Anaconda. The default location is /Users/YourName/anaconda3. Leave this as is and click Install. You may be asked for your Mac password — type it in and click Install Software. When the installation finishes, click Close.
Unlike Windows, the Mac installer does not always add Anaconda to your PATH automatically. Open Terminal (find it in Applications > Utilities > Terminal) and type the following command to initialize Anaconda:
conda init zsh
If you are using an older Mac with Bash instead of Zsh, type conda init bash instead. Close Terminal and open it again. The initialization is complete.
Installing on Linux
Open a terminal and navigate to the folder where you downloaded the installer. If it is in your Downloads folder, type:
cd ~/Downloads
Then run the installer (replace the filename with the one you downloaded):
bash Anaconda3-2024.02-Linux-x86_64.sh
Press Enter and read through the license agreement by pressing Space to scroll. When you reach the end, type yes and press Enter to accept. The installer will ask where to install Anaconda. Press Enter to accept the default location (/home/YourName/anaconda3). When asked if you want to initialize Anaconda, type yes and press Enter. Close Terminal and open it again for the changes to take effect.
Verifying the installation worked
Open a terminal (Terminal on Mac or Linux, Command Prompt on Windows). Type the following command:
conda --version
If Anaconda installed correctly, you will see a version number like "conda 24.1.2". If you see "command not found" or "is not recognized", the PATH was not set up correctly. On Windows, restart your computer and try again. On Mac or Linux, make sure you closed and reopened Terminal after initialization.
Next, type:
python --version
You should see Python 3.11 or 3.12 (or whichever version came with your Anaconda read). This confirms that Anaconda's Python is the one your terminal is using.
Creating your first environment
Anaconda environments are separate workspaces where you can install libraries without affecting other projects. To create an environment for a new project, type:
conda create --name myproject python=3.11
Replace "myproject" with a name that describes what you are working on — for example, "datanalysis" or "webproject". The command creates a new environment with Python 3.11. Conda will ask you to confirm by typing y and pressing Enter.
To start using this environment, type:
conda set up myproject
Your terminal prompt will change to show the environment name in parentheses, like (myproject) C:\Users\YourName>. Now you can install libraries specific to this project without affecting other work. When you are done working, type conda deactivate to return to your base environment.
Installing libraries and next steps
With your environment active, you can install libraries using conda. For example, to install Pandas (a library for working with data tables), type:
conda install pandas
Conda will show you what it is about to install and ask for confirmation. Type y and press Enter. The library downloads and installs automatically, along with any other libraries it depends on.
To launch Jupyter Notebook (a tool for writing and running Python code in your browser), type:
jupyter notebook
Your browser will open to a local Jupyter page where you can create and run code. When you are done, close the browser tab and press Ctrl+C in the terminal to stop Jupyter.
Frequently Asked Questions
Do I need to uninstall Python before installing Anaconda?
No. Anaconda installs its own copy of Python in its own folder, so it will not interfere with any Python you already have. If you want to use Anaconda's Python as your default, make sure the PATH was set correctly during installation. You can have both versions on your computer at the same time.
How much disk space does Anaconda use?
The full Anaconda installation takes about 3 to 5 gigabytes after unpacking. Miniconda takes about 500 MB to 1 GB. Each environment you create adds a few hundred megabytes. If disk space is tight, Miniconda is a better choice.
Can I use Anaconda with an IDE like Visual Studio Code?
Yes. Open Visual Studio Code, install the Python extension from Microsoft, and it will automatically detect Anaconda environments. You can select which environment to use for each project in the bottom right corner of the editor.
What is the difference between conda and pip?
Conda is Anaconda's package manager and handles both Python libraries and non-Python tools. Pip is Python's built-in package manager and only handles Python libraries. Conda is generally better for data science work because it manages dependencies more carefully. You can use both in the same environment, but conda first is usually the safer approach.
How do I remove an environment I no longer need?
Type conda remove --name myproject --all, replacing "myproject" with the environment name. Conda will ask for confirmation. Type y and press Enter to delete the environment and free up the disk space it used.