打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
Conda
info

1. conda info

provides information about Anaconda environments.

2. conda info --envs  [conda info -e]

displays the ROOT_DIR Anaconda directory, and test environments within it.

3. conda info --license

displays information about local licenses, including what they are and where they are located.

4. conda info --system
can be used to display the PATH and PYTHONPATH environment variables, which can beuseful for the purposes of debugging.

5.  conda info --all

To display all relevant information at once, use the conda info --all option.


List


1. conda list -p  [$ conda list -p ~/envs/test2]

shows the linked packages and their versions in a specificenvironment directory. --prefix also works. If no prefix is provided,conda will look in the default environment.

2. $ conda list ^py

In this next example, we leave off the prefix and search for packages starting with py in the default directory.


Search

conda search is a versatile option that can be used to explore packages available from known repositories or installed locally.

1. $ conda search scipy

In the first example, we want to simply search for SciPy and see if it is inconda’s list of packages.

2.$ conda search -p ~/anaconda/envs/onlyScipy/

Using the prefix option (-p), we can select an environment, and search for all packages that are compatible with it.

It is also possible to get the same output as the above example by using the name option (-n) with the name of an Anaconda environment.

Create

In this example, we use conda create to make an environment ina directory (specified with -p/--prefix), for one or more packages. We have also chosen to displaya progress bar, displayed as it creates the environment.

1. $ conda create -p ~/anaconda/envs/test2 anaconda=1.4.0 python=2.7 numpy=1.6

创建环境并安装 anaconda

We’ll start with an environment created in a specific path (~/anaconda/envs/test2) using the –prefix option (-p).

2. $ conda create --quiet --yes -n foo python

In this next example, rather than selecting an environment directory with a prefix, we will use the name option (-n/--name).This will create an environment in the default Anaconda/envs ROOT_DIR(which can be displayed by using conda info),where it will be discoverable by using conda’sinfo –envs option.

It is possible to disable a progress bar (--quiet) if you don’t wish to show the status of anypackages conda has to download. You can also skip the Proceed(y/n)? check with --yes

Update

conda update replaces old packages in a given environment with the latestversions. Note that Python will not update past the major version that isinstalled (so for example, if Python 2.7.4 is installed, conda update python willinstall Python 2.7.7, not 3.4.1).

1. conda update -p /tmp/matplotlib matplotlib

For this first example, we will use an environment /tmp/matplotlib, which we can select using the prefix (-p) option.

2. $ conda update -n matplot matplotlib

For this next example, we will do almost the same thing, but instead of using the prefix option, we will use name (-n)on an environment /home/test/anaconda/envs/matplotlib.



Install

conda install places a package in an environment that may already exist,in this case /envs/myenv.

As before, conda will link all necessary dependencies.

1. $ conda install -p ~/anaconda/envs/myenv scipy


2. $ conda install --yes --quiet -n myenv pandas

In this next example, using the name (-n) option will install a package or packages in an existing environment located in~/anaconda/envs.

As with conda create, we can use the --yes and --quiet options to automatically answer yes to the confirmation question andhide the progress bar, respectively.



本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
使用 Anaconda 管理 Python 环境
conda管理软件遇到的莫名其妙的的库文件缺少
Anaconda安装及使用教程
Pycharm解释器环境Virtualenv/Conda的区别
Python 包的依赖管理,有解了!
Anaconda简单入门
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服