FAQ — Anaconda Enterprise 4.4 documentation

Anaconda Enterprise: Documentation

# FAQ

Contents

- FAQ
  - General questions
  - Getting help
  - Searching & info
  - Managing Packages
    - Installing packages
    - Updating packages
    - Removing packages
  - Managing Environments
    - Getting info about environments
    - Creating new environments
    - Activate and deactivate
    - Installing packages
    - Removing packages and environments
  - Customization (.condarc file)
  - Conda build and recipes
  - Pinning packages
  - Conda, pip, and virtualenv
  - Silent installation
  - Using conda with Travis CI
  - Windows XP with proxy configuration

## General questions

1. What is conda?

Conda is a cross-platform and Python-agnostic package manager and environment manager program that quickly installs, runs and updates packages and their dependencies and easily creates, saves, loads and switches between environments on your local computer. Conda is included in all versions of Anaconda, Miniconda and Anaconda Repository.

2. What is Miniconda?

Miniconda includes conda, Python and a small number of other useful packages including pip, zlib and a few others.

3. What is Anaconda?

Anaconda includes everything in Miniconda and a stable collection of over 150 standard open source packages for data analysis and scientific computing that have all been tested to work well together, including scipy, numpy and many others. These packages can all be installed automatically with one quick and convenient installation routine.

4. Do Miniconda and Anaconda include Python?

Yes. Because Anaconda and Miniconda include Python, they are Python distributions, and can make installing Python quick and easy even for new users.

5. When should I use Miniconda instead of Anaconda?

If you use Miniconda instead of the full Anaconda then you must choose each package you want and use conda to download and install them. Miniconda can be used when disk space is limited or if you do not wish to take the time to download and install all the Anaconda packages at once.

6. Do I need to uninstall other Python installations or packages to use conda?

No. Even if you already have a system Python, another Python installation from a source such as the macOS Homebrew package manager, and globally installed packages from pip such as pandas and numpy, you do not need to uninstall, remove, or change any of them before using conda.

Just install Anaconda or Miniconda normally, and let the installer add the conda installation of Python to your PATH environment variable. There is no need to set the PYTHONPATH environment variable.

To examine your PATH variable and see if the conda installation of Python is in it, you can use `echo $PATH` on macOS or Linux or `echo %PATH%` on Windows. To see which Python installation is currently set as the default, use `which python` on macOS or Linux and `where python` on Windows. To see which packages are installed in your current conda environment and their version numbers, use `conda list`.

## Getting help

1. How can I see what conda commands are supported?

    conda -h

Or on the web in our command reference guide, Command reference.

2. How can I get help for a specific command, such as conda create?

    conda create -h

3. How can I get help with using conda?

Download our Conda cheat sheet and Quick install guide, take the 30-minute Test drive, and see the complete Using conda section of our documentation site.

Get free community support with our Google group.

There are also paid support, training and consulting options. See our Support Services page for more information.

## Searching & info

1. How can I find out what version of conda I have installed?

By entering the following in your terminal window:

    conda info

or by entering:

    conda -V

SEE ALSO: the complete Using conda section of our documentation site.

2. How can I check if a specific package, such as SciPy, is available for installation?

    conda search scipy

3. How can I check if a specific package, such as SciPy, is available for installation from the Anaconda repos?

    conda search --override-channels --channel defaults scipy

SEE ALSO: the Managing packages section of our documentation site.

4. How do I check if a specific package such as iminuit exists in a specific channel (for example, http://conda.anaconda.org/mutirri) and is available for installation?

    conda search --override-channels --channel http://conda.anaconda.org/mutirri iminuit

## Managing Packages

### Installing packages

1. How can I install a specific package, such as SciPy?

       conda install scipy

2. How can I install a package such as SciPy, in a specific version?

       conda install scipy=0.15.0

3. How can I install more than one package at once, such as SciPy and cURL)?

       conda install scipy curl

NOTE: We recommend that you install all packages at once, so all the dependencies are installed at the same time.

4. How can I install many packages at once and specify the version of the package?

       conda install scipy=0.15.0 curl=7.26.0

5. How can I install a package for a specific Python version?

Generally if you want to use a specific Python version it is best to use an environment with that version. Find a detailed example in Troubleshooting.

>     conda install scipy=0.15.0 curl=7.26.0 -n py34_env

NOTE: We recommend that you install all packages at once, so all the dependencies are installed at the same time.

### Updating packages

1. How can I update conda itself?

       conda update conda

2. How do I update the Anaconda meta package?

       conda update conda
       conda update anaconda

3. How can I update a specific package, such as SciPy?

       conda update scipy

4. How can I prevent a specific package from being updated?

   See Pinning packages.

### Removing packages

1. How can I remove a specific package, such as SciPy?

       conda remove scipy

2. How can I remove multiple packages at once, for example, SciPy and cURL?

       conda remove scipy curl

## Managing Environments

### Getting info about environments

1. How can I get a list of all of my environments?

       conda info -e

SEE ALSO: the Managing environments section of our documentation site.

2. How can I set whether my command prompt shows the name of the active environment?

   This option can be disabled with `conda config --set changeps1 false` and enabled with `conda config --set changeps1 true`. It is enabled by default and can be tested by activating and then deactivating any environment.

3. How can I list all installed packages in a specific environment, for example, `myenv`?

   If `myenv` is not activated:

   >     conda list -n myenv

   If `myenv` is activated:

   >     conda list

4. How can I check if a package (for example, SciPy) is already installed in an existing environment such as `myenv`?

   >     conda list -n myenv scipy

### Creating new environments

1. How can I create a new and clean environment, for example, `myenv`?

       conda create -n myenv python

SEE ALSO: the Managing environments section of our documentation site.

2. How can I create a new environment such as `myenv` with a specific version of python as the default interpreter inside it?

       conda create -n myenv python=3.4

3. How can I create a new environment, for example, `myenv` with a specific package in it, for example, SciPy?

   - In one line:

         conda create -n myenv scipy

   - In multiple lines:

         conda create -n myenv python
         conda install -n myenv scipy

4. How can I create a new environment with a specific package in a specific version?

   - In one line:

         conda create -n myenv scipy=0.15.0

   - In multiple lines:

         conda create -n myenv python
         conda install -n myenv scipy=0.15.0

5. How can I use pip in my environment `myenv`?

       conda install -n myenv pip
       source activate myenv
       pip <pip_subcommand>

### Activate and deactivate

1. How can I activate the existing environment `myenv`?

Linux, macOS: `source activate myenv`

Windows: `activate myenv`

SEE ALSO: the Managing environments section of our documentation site.

2. How can I deactivate the active environment `myenv`?

Linux, macOS: `source deactivate myenv`

Windows: `deactivate myenv`

NOTE: In Windows it is good practice to deactivate one environment before activating another.

### Installing packages

1. How can I install a specific package for example, SciPy, in an existing environment `myenv`?

   >     conda install -n myenv scipy

2. How can I install a specific version of a package like SciPy in the existing environment `myenv`?

   If `myenv` not activated:

   >     conda install -n myenv scipy=0.15.0

The -n or name tells conda to install the environment into the environment named myenv.

> If `myenv` is activated:

> >     conda install scipy=0.15.0

3. How can I automatically install pip or another program every time I create a new environment?

       conda config --add create_default_packages pip

   After performing the above command you can create new environments in the standard way, and the default package(s) will be installed in all of them.

4. How can I automatically install a specific package like SciPy during creation of any new environment?

       conda config --add create_default_packages scipy

After performing the above command you can create new environments in the standard way, and the latest version of SciPy will be installed in all of them.

5. How can I automatically install a specific version of a package such as SciPy during creation of any new environment?

       conda config --add create_default_packages scipy=0.15.0

After performing the above command you can create new environments in the standard way, and SciPy Version 0.15.0 will be installed in all of them.

6. How can I ignore packages from automatic installation during creation of a new and clean environment, such as `myenv`?

       conda create --no-default-packages -n myenv python

7. When making a python package for an app I create an environment for the app from a file req.txt that sets python=2.7.9. However, when I conda install my package it automatically upgrades to 2.7.10. How do I avoid this?

If you make a conda package for the app using conda-build, you can set dependencies with specific version numbers. In this example the requirements lines that say “- python” could be “- python ==2.7.9” instead. It is important to have one space before the == operator and no space after.

### Removing packages and environments

1. How can I remove the package SciPy in an existing environment such as `myenv`?

   If `myenv` is not activated:

   >     conda remove -n myenv scipy

   If `myenv` is activated:

   >     conda remove scipy

2. How can I remove an existing environment such as `myenv`?

   >     conda remove -n myenv --all

## Customization (.condarc file)

NOTE: It may be necessary to add the “force” option `-f` to the following commands.

1. How can I get all keys and their values from my .condarc file?

       conda config --get

2. How can I get the value of a specific key (for example, channels) from my .condarc file?

       conda config --get channels

3. How can I add a new value (for example, http://conda.anaconda.org/mutirri) to a specific key (for example, channels)?

       conda config --add channels http://conda.anaconda.org/mutirri

4. How can I remove an existing value (for example, http://conda.anaconda.org/mutirri) from a specific key?

       conda config --remove channels http://conda.anaconda.org/mutirri

5. How can I remove a key (for example, the channels key) and all of its values?

       conda config --remove-key channels

6. How can I configure channels and their priority for just one environment?

Make a `.condarc` file in the root directory of that environment.

## Conda build and recipes

1. How can I create a skeleton conda recipe for a package such as bottle if I know that this package is on PyPI?

       conda skeleton pypi bottle

   You can then build it with

       conda build bottle

SEE ALSO: Building conda packages with conda skeleton tutorial.

## Pinning packages

You can pin a package specification in an environment, which will prevent it from being updated, unless the `--no-pin` flag is passed to conda. To do so, add a file named `pinned` to the environment’s `conda-meta` directory with a list of specs. For example, a file with this command:

    numpy 1.7.*
    scipy ==0.14.2

will force numpy to stay on the 1.7 series (any version that starts with “1.7.”), and will force scipy to stay at exactly version 0.14.2.

NOTE: With this pinned file, `conda update numpy` will keep numpy at 1.7.1, and `conda install scipy=0.15.0` will lead to an error. To force either of these, use the `--no-pin` flag, like `conda update numpy --no-pin`. The way pinning works is that the pinned specs are included with each conda install, so subsequent `conda update` commands without `--no-pin` will revert numpy back to the 1.7 series.

## Conda, pip, and virtualenv

If you are already familiar with pip or virtualenv, please see our chart comparing Conda, pip, and virtualenv.

## Silent installation

Silent installation of Miniconda or Anaconda can be used for deployment or testing or building services such as Travis CI and Appveyor.

## Using conda with Travis CI

Conda can be combined with continuous integration systems such as Travis CI and AppVeyor to provide frequent, automated testing of your code.

## Windows XP with proxy configuration

Although Windows XP mainstream support and Extended Support from Microsoft have ended and Windows XP is no longer one of the target systems supported by Anaconda, some users have successfully installed Anaconda on Windows XP with proxy configuration.