anaconda base环境的地址_使用Anaconda克隆根环境

Going through one of (very few available) tutorials on Anaconda, I tried:

$ conda create -n rootclone --clone root

This failed:

src_prefix: '/home/bir/conda'

dst_prefix: '/home/bir/conda/envs/rootclone'

Packages: 49

Files: 471

An unexpected error has occurred, please consider sending the

following traceback to the conda GitHub issue tracker at:

https://github.com/conda/conda/issues

Include the output of the command 'conda info' in your report.

Traceback (most recent call last):

File "/home/bir/conda/bin/conda", line 5, in

sys.exit(main())

File "/home/bir/conda/lib/python2.7/site-packages/conda/cli/main.py", line 203, in main

args_func(args, p)

File "/home/bir/conda/lib/python2.7/site-packages/conda/cli/main.py", line 208, in args_func

args.func(args, p)

File "/home/bir/conda/lib/python2.7/site-packages/conda/cli/common.py", line 609, in inner

return func(args, parser)

File "/home/bir/conda/lib/python2.7/site-packages/conda/cli/main_create.py", line 50, in execute

install.install(args, parser, 'create')

File "/home/bir/conda/lib/python2.7/site-packages/conda/cli/install.py", line 170, in install

clone(args.clone, prefix, json=args.json, quiet=args.quiet)

File "/home/bir/conda/lib/python2.7/site-packages/conda/cli/install.py", line 91, in clone

quiet=quiet)

File "/home/bir/conda/lib/python2.7/site-packages/conda/misc.py", line 177, in clone_env

data = s.encode('utf-8')

MemoryError

And badly. The environment is created:

$ conda info -e

# conda environments:

#

oracle /home/bir/conda/envs/oracle

oracleclone /home/bir/conda/envs/oracleclone

rootclone /home/bir/conda/envs/rootclone

root * /home/bir/conda

But it's not working at all:

$ . activate rootclone

discarding /home/bir/conda/bin from PATH

prepending /home/bir/conda/envs/rootclone/bin to PATH

(rootclone)bir@N2C:~/python$ which python

/usr/bin/python # Should be in /home/bir/conda/envs/rootclone/bin

But is this a true bug, or is conda create -n --clone just not designed for cloning the conda root environment?

解决方案

Use following command to clone default root environment of Anaconda, the root environment is named as base. This worked for me with Anaconda3-5.0.1

conda create --name --clone base

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值