banner



How To Run Conda On Windows

Installation Instructions

Check to encounter if Conda is already installed

If yous accept e'er installed the Anaconda Python distribution on your local machine, then you already have Conda installed! Mac and Linux users tin can cheque whether Conda is installed by running the following command in a terminal.

                          $              which conda /Users/$USERNAME/miniconda3/bin/conda                      

If Conda has already been installed on your motorcar, then this command should render the accented path to the conda executable.

Windows users should search for "Anaconda" to see if the "Anaconda Command Prompt" shows up as an pick, if information technology does and then you already accept Conda installed.

Old version of Anaconda?

If you previously installed the Anaconda Python distribution you may take an old version of Conda. You can check your version of Conda with the following command.

If you have a version of Conda that is 4.5 (or older), so information technology is probably best to uninstall your Anaconda Python distribution and and so reinstall the most recent version.

Install Python three version of Miniconda

If Conda has not been installed on your motorcar, then install the Python 3 version of Miniconda for your Os. Every bit the name suggests, Miniconda is a "mini" version of the Anaconda Python distribution that includes merely Conda, a Python 3 distribution, and whatsoever necessary Os-specific dependencies.

For convenience here are links to the 64-bit Miniconda installers.

  • Windows
  • Mac OSX
  • Linux

Adopt Miniconda to Anaconda

I suggest installing Miniconda which combines Conda with Python three (and a small number of core systems packages) instead of the total Anaconda distribution. Installing simply Miniconda will encourage you to create separate environments for each project (and to install only those packages that yous actually need for each project!). Project specific environments heighten portability and reproducibility of your enquiry and workflows.

Besides, if you lot actually want the full Anaconda distribution y'all can e'er create an new conda surroundings and install it using the following control.

                              $                conda create                --name                my-anaconda-env                anaconda                =v.3                          

We will discuss the above command in not bad depth in the workshop.

Windows installation

After you downloaded the Windows GUI installer, double click on it and follow the instructions (accept license, etc.). You can employ the defaults except for the "Advanced Installation Options" where you lot would tick on "Add Miniconda3 to my PATH environment variable".

Mac OSX installation

Afterward you downloaded the Mac OSX GUI installer, double click on information technology and follow the instructions (accept license, etc.). When you lot are asked where to install Miniconda, you should leave the default selection to "install for me only". If you become the fault bulletin "You cannot install Miniconda in this location," reselect "Install for me but". Then you lot should be able to proceed to the next. The default option will modify your PATH in ~/.bash_profile. If you open the terminal after installation is over, you would run across "(base)" on the left side of prompt.

Linux installation

I will walk through the steps for installing on Linux systems below equally installing on Linux systems is slightly more involved. First, download the 64-flake Python 3 install script for Miniconda (clicking the link above will download the same script!).

            wget              --placidity              https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh                      

Run the Miniconda install script. Follow the prompts on the installer screens. If you are unsure about any setting, have the defaults (you lot can change them after if necessary).

            bash Miniconda3-latest-Linux-x86_64.sh                      

Once the install script completes, you can remove information technology.

                          rm              Miniconda3-latest-Linux-x86_64.sh                      

Verifying your Conda installation

In order to verify that you lot accept installed Conda correctly run the conda help command. Output of the command should look similar to the following.

                          $              conda              help              usage: conda              [              -h              ]              [              -5              ]              command              ...  conda is a tool              for              managing and deploying applications, environments and packages.  Options:  positional arguments:              command              make clean        Remove unused packages and caches.     config       Modify configuration values              in              .condarc. This is modeled                  after the git config command. Writes to the user .condarc                  file              (/Users/drpugh/.condarc)              by default.     create       Create a new conda environment from a list of specified                  packages.              help              Displays a list of available conda commands and their              help              strings.     info         Brandish data about current conda install.     init         Initialize conda              for              crush interaction.              [Experimental]              install              Installs a list of packages into a specified conda                  environment.     list         List linked packages              in              a conda surround.     package      Low-level conda package utility.              (EXPERIMENTAL)              remove       Remove a list of packages from a specified conda environment.     uninstall    Alias              for              conda remove.     run          Run an executable              in              a conda environment.              [Experimental]     search       Search              for              packages and display associated information. The                  input is a MatchSpec, a query language              for              conda packages.                  See examples below.     update       Updates conda packages to the latest compatible version.     upgrade      Alias              for              conda update.  optional arguments:              -h,              --help              Evidence this              help              message and exit.              -V,              --version              Bear witness the conda version number and leave.  conda commands bachelor from other packages:              env                      

At the bottom of the aid menu you volition run into a department with some optional arguments for the conda control. In particular y'all can laissez passer the --version flag which will return the version number. Again output should look like to the following.

                          $              conda              --version              conda 4.8.2                      

Make certain yous have the most recent version

Once Conda exists on your machine, and so run the following command to make sure that you have the most recent version and patches.

                          $              conda update              --proper name              base              --aqueduct              defaults              --yes              conda                      

You can re-run this control at any fourth dimension to update to the most contempo version of Conda.

Initializing your shell for Conda

Key parts of Conda's functionality require that information technology interact directly with the shell within which Conda commands are being invoked as such each shell must be configured to brand use of them. The conda init command initializes a beat for utilise with Conda past making changes to your system that are specific and customized for each trounce. Conda supports a number of different shells and you can run conda init --help to see the consummate list.

Mac OSX and Linux users will desire to initialize Conda for Bash as follows. If you lot are installing on Linux, so you may be prompted to initialize Conda for your beat out when running the installation script. If then, then you can safely skip this step.

Windows users tin either apply the Anaconda Control Prompt or the Anaconda Powershell Prompt which are already initialized for Conda or they can initialize Conda for Powershell as follows.

After running conda init you volition need to shut and restart your shell for changes to take consequence. Alternatively, Mac Bone and Linux users can reload your ~/.bashrc profile (which was changed by running the conda init command). To reload your ~/.bashrc contour, utilise the following command.

If you desire to reverse or "disengage" the changes made by conda init, then you can re-run the conda init command and pass the --opposite choice. Once again, in guild for the reversal to take effect y'all will likely need to close and restart your shell session.

Use of Folder instead of installing Conda (Optional)

If you lot wish to get started with this form without installing Conda, and so you can use a pre-configured instance running on Binder by clicking on the link below.

Binder

Workspace for Conda environments

In order to maintain a consequent workspace for all your conda environment, we will create a new introduction-to-conda-for-information-scientists directory on your Desktop and store our conda environment in this directory. On Mac OSX and Linux running post-obit commands in the Last will create the required directory on the Desktop.

                          $                            cd              ~/Desktop              $                            mkdir              introduction-to-conda-for-information-scientists              $                            cd              introduction-to-conda-for-data-scientists                      

For Windows users you may need to contrary the direction of the slash and run the commands from the command prompt.

                          >              cd              ~\Desktop              >              mkdir              introduction-to-conda-for-data-scientists              >              cd              introduction-to-conda-for-data-scientists                      

Alternatively, you tin can e'er "right-click" and "create new binder" on your Desktop. All the commands that are run during the workshop should be run in a terminal inside the introduction-to-conda-for-data-scientists directory.

Source: https://carpentries-incubator.github.io/introduction-to-conda-for-data-scientists/setup/

Posted by: koehlertallean.blogspot.com

0 Response to "How To Run Conda On Windows"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel