Cloning root environment with Anaconda(使用 Anaconda 克隆根环境)
本文介绍了使用 Anaconda 克隆根环境的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
浏览了其中一个(非常少的)Anaconda 教程,我尝试了:
Going through one of (very few available) tutorials on Anaconda, I tried:
$ conda create -n rootclone --clone root
这失败了:
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 <module>
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
但它根本不起作用:
$ . 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
但这是一个真正的错误,还是 conda create -n --clone
只是不是为克隆 conda 根环境而设计的?
But is this a true bug, or is conda create -n --clone
just not designed for cloning the conda root environment?
推荐答案
使用如下命令克隆Anaconda默认的根环境,根环境命名为base.这对我有用 Anaconda3-5.0.1
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 <env_name> --clone base
这篇关于使用 Anaconda 克隆根环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
沃梦达教程
本文标题为:使用 Anaconda 克隆根环境
基础教程推荐
猜你喜欢
- 使用Python匹配Stata加权xtil命令的确定方法? 2022-01-01
- 合并具有多索引的两个数据帧 2022-01-01
- Python 的 List 是如何实现的? 2022-01-01
- 使 Python 脚本在 Windows 上运行而不指定“.py";延期 2022-01-01
- 将 YAML 文件转换为 python dict 2022-01-01
- 症状类型错误:无法确定关系的真值 2022-01-01
- 使用 Google App Engine (Python) 将文件上传到 Google Cloud Storage 2022-01-01
- 哪些 Python 包提供独立的事件系统? 2022-01-01
- 如何在Python中绘制多元函数? 2022-01-01
- 如何在 Python 中检测文件是否为二进制(非文本)文 2022-01-01