Python for Scientists – Installation for Windows

If used properly, Anaconda can take most of the annoyances out of managing Python libraries and virtual environments. Even if corruption occurs (yes, it will happen), this series will equip you with means to replicate your working environments. Before we get to disaster recovery, we need a solid base installation. Remember, this post covers installation for Windows 10 Operating Systems. A Linux version is available here.

This post will cover

  • Download
  • Installation Prep
  • Installation
  • Post Installation

Click here for a list of related posts.

Updated: 2019-08-26


Download

Go here to download the latest version of Miniconda. Download Miniconda3, not Miniconda2! Download either the 32-bit or 64-bit version that corresponds to your computers architecture. If you don’t know which architecture you’re using, check this out. I’m going to download the 64-bit version of Miniconda3.

Installation Prep

WARNING Your installation path CANNOT have special characters such as periods, commas, or parentheses. The path can only contain letters, numbers, back (or forward) slashes, and colons. Anaconda/Miniconda will not work with special characters in the installation path.

Next, create a folder named “miniconda3” somewhere you have permission to install things. If you’re not an administrator on the machine, Miniconda3 can be installed anywhere except the Program Files directory (unless Anaconda is whitelisted by your administrator). I typically install Miniconda in %USERPROFILE%\Documents\miniconda3. To check your user profile, open a command prompt and type echo %USERPROFILE% followed by the enter key. Your respective path will be returned to the prompt like mine in the image below.

Now that you have decided on a location to install Miniconda3, let’s get to it!

Installation

Double-click on the Miniconda3 installation executable that was downloaded earlier (it’s probably in your ~\Downloads folder). Click the ‘Next’ button.

You can read the End User Agreement if you really want to. Then click ‘I Agree’.

I highly recommend selecting the ‘Only Me’ option for installation. Make your choice and then click ‘Next’.

On the installation location screen, click the ‘Browse’ button. Navigate to the folder you created in the Installation Prep section and select that folder. In my case the path is C:\Users\AtmoGuy\Documents\miniconda3.

Leave the default options selected on the next window and then click install. You won’t be able to use conda (the package manager) or Python from a command prompt without adding paths to your environment variables, but that’s fine. We will use the Anaconda Prompt when interacting with conda. If you really want to use conda/Python from the command prompt, select the top checkbox to add Anaconda to the PATH environment variable. Be careful if you select the top box as this could break other program installations that utilize Python!

Now is a good time to break for the restroom or to get a cup of coffee while Miniconda3 is installed. It only takes a minute or less, but I’m looking out for your comfort. Upon completion, select the ‘Next’ button.

I recommend unselecting the checkboxes on the last prompt unless you really want to read the info. Whatever you chose to do, click ‘Finish’.

Post Installation

You can try to type conda into a command prompt, but it won’t work (unless you selected the not-recommended checkbox to add the environment to the PATH variable). Instead, search for Anaconda Prompt with the magnifying glass.

Click the magnifying glass and search for Anaconda Prompt

Click on ‘Anaconda Prompt’ and viola, a prompt will appear. Give it a few seconds to catch its breath before throwing your hands up in the air. Eventually a cursor will appear as in the image below. If this happens, you are good to go!

DO NOT start installing packages for a project in the root Miniconda environment (FYI the root environment is what we just installed). DO NOT (it’s worth repeating) install anything in the root Miniconda environment, because this can corrupt the entire python environment which results in re-installation of everything (huge time waste/panic city/experience gained the hard way). If you accidentally install something in root, remove it.

The next step is to create our first environment! The commands between operating systems are the same on the user side so it doesn’t matter if you’re using Linux, Windows, or Mac in the next steps.


Liked it? Take a second to support AtmoGuy on Patreon!
Become a patron at Patreon!

Comments are closed.

Proudly powered by WordPress | Theme: Baskerville 2 by Anders Noren.

Up ↑