Đi qua một trong (rất ít có) tutorials on Anaconda, tôi đã cố gắng:Cloning với Anaconda
$ conda create -n rootclone --clone root
này thất bại:
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
Và tồi tệ. Môi trường được tạo ra:
$ 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
Nhưng nó không làm việc ở tất cả:
$ . activate rootclone
discarding /home/bir/conda/bin from PATH
prepending /home/bir/conda/envs/rootclone/bin to PATH
(rootclone)[email protected]:~/python$ which python
/usr/bin/python # Should be in /home/bir/conda/envs/rootclone/bin
Nhưng đây là một lỗi đúng, hoặc là conda create -n --clone
chỉ không được thiết kế cho nhân bản môi trường gốc conda?
Một tìm kiếm nhanh chóng trong những vấn đề GitHub cho thấy rằng có những người khác báo cáo những điều tương tự như lỗi và không được nói "không làm điều đó, giả", như [ # 1248] (https://github.com/conda/conda/issues/1248). – abarnert
Trong khi đó, cho dù theo dõi vấn đề của họ hoặc trên StackOverflow, bạn có thể nhận được nhiều hơn/trợ giúp tốt hơn nếu bạn cho chúng tôi biết bạn đang sử dụng nền tảng nào, phiên bản Anaconda bạn có, cách bạn cài đặt, v.v. – abarnert
Tôi không xem bất kỳ lý do nào bạn sẽ sao chép root. Root giữ các gói mặc định được sử dụng khi tạo env mới. Bạn chỉ có thể sao chép envs trong thư mục envs. Lưu ý rằng thư mục gốc không nằm trong thư mục envs. – alvits