久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

你怎么能“克隆"?一個conda環境進入root環境

How can you quot;clonequot; a conda environment into the root environment?(你怎么能“克隆?一個conda環境進入root環境?)
本文介紹了你怎么能“克隆"?一個conda環境進入root環境?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

I'd like the root environment of conda to copy all of the packages in another environment. How can this be done?

解決方案

There are options to copy dependency names/urls/versions to files.

Recommendation

Normally it is safer to work from a new environment rather than changing root. However, consider backing up your existing environments before attempting changes. Verify the desired outcome by testing these commands in a demo environment. To backup your root env for example:

λ conda activate root
λ conda env export > environment_root.yml
λ conda list --explicit > spec_file_root.txt

Options

Option 1 - YAML file

Within the second environment (e.g. myenv), export names+ to a yaml file:

λ activate myenv
λ conda env export > environment.yml  

then update the first environment+ (e.g. root) with the yaml file:

λ conda env update --name root --file environment.yml     


Option 2 - Cloning an environment

Use the --clone flag to clone environments (see @DevC's post):

λ conda create --name myclone --clone root

This basically creates a direct copy of an environment.


Option 3 - Spec file

Make a spec-file++ to append dependencies from an env (see @Ormetrom):

λ activate myenv
λ conda list --explicit > spec_file.txt
λ conda install --name root --file spec_file.txt

Alternatively, replicate a new environment (recommended):

λ conda create --name myenv2 --file spec_file.txt

See Also

  • conda env for more details on the env sub-commands.
  • Anaconada Navigator desktop program for a more graphical experience.
  • Docs on updated commands. With older conda versions use activate (Windows) and source activate (Linux/Mac OS). Newer versions of conda can use conda activate (this may require some setup with your shell configuration via conda init).
  • Discussion on keeping conda env

Extras

There appears to be an undocumented conda run option to help execute commands in specific environments.

# New command
λ conda run --name myenv conda list --explicit > spec_file.txt

The latter command is effective at running commands in environments without the activation/deactivation steps. See the equivalent command below:

# Equivalent
λ activate myenv
λ conda list --explicit > spec_file.txt
λ deactivate

Note, this is likely an experimental feature, so this may not be appropriate in production until official adoption into the public API.

+Conda docs have changed since the original post; links updated. ++Spec-files only work with environments created on the same OS. Unlike the first two options, spec-files only capture links to conda dependencies; pip dependencies are not included.

這篇關于你怎么能“克隆"?一個conda環境進入root環境?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Troubles while parsing with python very large xml file(使用 python 解析非常大的 xml 文件時出現問題)
Find all nodes by attribute in XML using Python 2(使用 Python 2 在 XML 中按屬性查找所有節點)
Python - How to parse xml response and store a elements value in a variable?(Python - 如何解析 xml 響應并將元素值存儲在變量中?)
How to get XML tag value in Python(如何在 Python 中獲取 XML 標記值)
How to correctly parse utf-8 xml with ElementTree?(如何使用 ElementTree 正確解析 utf-8 xml?)
Parse XML from URL into python object(將 XML 從 URL 解析為 python 對象)
主站蜘蛛池模板: 最近中文字幕在线 | 国产精品国产精品国产专区不片 | 久久成人精品视频 | 久久少妇| 国产不卡在线 | 国产九九精品 | 成人欧美激情 | 久久黄色 | 婷婷伊人网 | 国产又爽又黄免费视频 | 国产精品久久久久久久久久久久午夜片 | 国产高清视频在线 | 亚洲久久久久久 | 亚洲精品一区二区三区在线观看 | 高h乱l高辣h文短篇h | 男女啪啪免费 | 久久精品国产一区 | 国产黄色免费视频 | 午夜看看 | 国产va在线 | 久草免费福利视频 | 色多多在线观看 | 亚洲自拍网站 | 91福利在线观看 | 色综合小说 | 精品国产va久久久久久久 | 日本欧美久久久久免费播放网 | 午夜黄色影院 | 亚洲国产精品va在线看黑人 | 激情久久久 | 狠狠干网站| 亚洲人成免费 | 亚洲av毛片成人精品 | 午夜综合网| 亚洲激情欧美激情 | 日韩视频网 | 国产精品成人一区二区网站软件 | 91们嫩草伦理| 久久精品久久久精品美女 | 欧美日韩在线观看视频 | 久久久久久中文字幕 |