Anaconda(Python科学计算环境)教程

简明版本

输入 conda list 来看所有安装时自带的Python扩展。

安装扩展conda install xxx . 如果需要指定版本,也可以直接用[package-name]=x.x

用conda创建一个名叫python2的版本为python2.7的环境。
conda create -n python2 python=2.7
这样就会在Anaconda安装目录下的envs目录下创建python2这个目录。

详细版本

Creating an environment with commands
https://conda.io/docs/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands

  • To create an environment:
conda create --name myenv

This creates the myenv environment in/envs/. This environment uses the same version of Python that you are currently using, because you did not specify a version.

  • To create an environment with a specific version of Python:
conda create -n myenv python=3.4
  • To create an environment with a specific package:
conda create -n myenv scipy
  • To create an environment with a specific version of a package:
conda create -n myenv scipy=0.15.0
  • To create an environment with a specific version of Python and multiple packages:
conda create -n myenv python=3.4 scipy=0.15.0 astroid babel

TIP: Install all the programs that you want in this environment at the same time. Installing 1 program at a time can lead to dependency conflicts.

  • To automatically install pip or another program every time a new environment is created, add the default programs to the create_default_packages section of your .condarc configuration file. The default packages are installed every time you create a new environment. If you do not want the default packages installed in a particular environment, use the –no-default-packages flag:
conda create --no-default-packages -n myenv python

TIP: You can add much more to the conda create command. For details, run conda create –help.

  • List all environments
conda info --envs

or

conda env list
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值