目录
4 Installing packages from Anaconda.org
5 Installing non-conda packages
6 Installing commercial packages
7 Viewing a list of installed packages
8 Listing package dependencies
10 Preventing packages from updating (pinning)防止软件包更新(固定)
11 Adding default packages to new environments automatically自动将默认包添加到新环境
Managing packages
管理包
Note 注意
There are many options available for the commands described on this page. For details, see commands.
有许多选项可用于本页所述的命令。有关详细信息,请参见命令。
1 Searching for packages
1 搜索包
Use the terminal for the following steps.
使用终端执行以下步骤。
To see if a specific package, such as SciPy, is available for installation:
要查看特定的软件包(如SciPy)是否可用于安装:
conda search scipy
To see if a specific package, such as SciPy, is available for installation from Anaconda.org:
要查看是否可以从Anaconda.org安装特定的软件包(如SciPy),请执行以下操作:
conda search --override-channels --channel defaults scipy
To see if a specific package, such as iminuit, exists in a specific channel, such as Package repository for mutirri :: Anaconda.org, and is available for installation:
要查看特定的包(如iminuit)是否存在于特定的通道(如http://conda.anaconda.org/mutirri)中,并且可用于安装:
conda search --override-channels --channel http://conda.anaconda.org/mutirri iminuit
2 Installing packages
2 安装软件包
Use the terminal for the following steps.
使用终端执行以下步骤。
To install a specific package such as SciPy into an existing environment "myenv":
要将特定的软件包(如SciPy)安装到现有的环境“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:
如果您不指定环境名称(在本示例中由 --name myenv
完成),则软件包将安装到当前环境中:
conda install scipy
To install a specific version of a package such as SciPy:
要安装特定版本的软件包,如SciPy:
conda install scipy=0.15.0
To install multiple packages at once, such as SciPy and cURL:
一次安装多个软件包,如SciPy和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:
要安装特定Python版本的软件包,请执行以下操作:
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 Troubleshooting.
如果你想使用特定的Python版本,最好使用该版本的环境。有关详细信息,请参阅故障排除。
3 Installing similar packages
3 安装类似的软件包
Installing packages that have similar filenames and serve similar purposes may return unexpected results. The package last installed will likely determine the outcome, which may be undesirable. If the two packages have different names, or if you're building variants of packages and need to line up other software in the stack, we recommend using Mutex metapackages.
安装具有类似文件名和服务类似目的的软件包可能会返回意外结果。最后安装的软件包可能会决定结果,这可能是不希望的。如果两个包有不同的名称,或者如果你正在构建包的变体,并且需要在堆栈中排列其他软件,我们建议使用Mutex元包。