NOTE: There are many options available for the commands described on this page. For details, see :doc:`../../commands`.
To see if a specific package such as SciPy is available for installation:
conda search scipy
To see if a specific package such as SciPy is available for installation from Anaconda.org:
conda search --override-channels --channel defaults scipy
To see if a specific package, such as iminuit, exists in a specific channel, such as http://conda.anaconda.org/mutirri, and is available for installation:
conda search --override-channels --channel http://conda.anaconda.org/mutirri iminuit
To install a specific package such as SciPy into an existing environment "myenv":
conda install --name myenv scipy
If you do not specify the environment name, which in this
example is done by --name myenv
, the package installs
into the current environment:
conda install scipy
To install a specific version of a package such as SciPy:
conda install scipy=0.15.0
To install multiple packages at once, such as SciPy and cURL:
conda install scipy curl
NOTE: It is best to install all packages at once, so that all of the dependencies are installed at the same time.
To install multiple packages at once and specify the version of the package:
conda install scipy=0.15.0 curl=7.26.0
To install a package for a specific Python version:
conda install scipy=0.15.0 curl=7.26.0 -n py34_env
If you want to use a specific Python version, it is best to use an environment with that version. For more information, see :doc:`../troubleshooting`.
Packages that are not available using conda install can be obtained from Anaconda.org. Formerly Binstar.org, Anaconda.org, is a package management service for both public and private package repositories. Anaconda.org is a Continuum Analytics product, just like Anaconda and Miniconda.
To install a package from Anaconda.org:
In a browser, go to http://anaconda.org.
To find the package named bottleneck, type
bottleneck
in the top-left box named Search Packages.Find the package that you want and click it to go to the detail page.
The detail page displays the name of the channel. In this example it is the "pandas" channel.
Now that you know the channel name, use the
conda install
command to install the package:conda install -c pandas bottleneck
This command tells conda to install the bottleneck package from the pandas channel on Anaconda.org.
Check to see that the package is now installed:
conda list
A list of packages appears, including bottleneck.
NOTE: For information on installing packages from multiple channels, see :doc:`manage-channels`.
If a package is not available from conda or Anaconda.org, you may be able to find and install the package with another package manager like pip.
NOTE: Both pip and conda are included in Anaconda and Miniconda, so you do not need to install them separately.
NOTE: Conda environments replace virtualenv, so there is no need to activate a virtualenv before using pip.
To install a non-conda package:
Activate the environment where you want to put the program:
- Windows:**
activate myenv
. - Linux, OS X:**
source activate myenv
.
- Windows:**
Use pip to install a program such as See:
pip install see
Verify the package was installed:
conda list
Installing a commercial package such as IOPro is the same as installing any other package:
conda install --name myenv iopro
This command installs a free trial of one of Continuum’s commercial packages called IOPro, which can speed up your Python processing. Except for academic use, this free trial expires after 30 days.
To list all of the packages in the active environment:
conda list
To list all of the packages in a deactivated environment:
conda list -n myenv
Use conda update
command to check to see if a new update is
available. If conda tells you an update is available, you can
then choose whether or not to install it.
To update a specific package:
conda update biopython
To update Python:
conda update python
To update conda itself:
conda update conda
NOTE: Conda updates to the highest version in its series, so Python 2.7 updates to the highest available in the 2.x series and 3.6 updates to the highest available in the 3.x series.
To update the Anaconda metapackage:
conda update conda
conda update anaconda
Regardless of what package you are updating, conda compares versions and then reports what is available to install. If no updates are available, conda reports "All requested packages are already installed."
If a newer version of your package is available and you wish to
update it, type y
to update:
Proceed ([y]/n)? y
Pinning a package specification in an environment prevents
packages listed in the pinned
file from being updated.
In the environment's conda-meta
directory, add a file
named pinned
that includes a list of the packages that you
do not want updated.
EXAMPLE: The file below forces NumPy to stay on the 1.7 series, which is any version that starts with 1.7, and forces SciPy to stay at exactly version 0.14.2:
numpy 1.7.* scipy ==0.14.2
With this pinned
file, conda update numpy
keeps NumPy at
1.7.1, and conda install scipy=0.15.0
causes an error.
Use the --no-pin
flag to override the update restriction on
a package:
conda update numpy --no-pin
Because the pinned
specs are included with each conda
install, subsequent conda update
commands without
--no-pin
will revert NumPy back to the 1.7 series.
To remove a package such as SciPy in an environment such as myenv:
conda remove -n myenv scipy
To remove a package such as SciPy in the current environment:
conda remove scipy
To remove multiple packages at once, such as SciPy and cURL:
conda remove scipy curl
To confirm that a package has been removed:
conda list