久久久久久久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 對象)
主站蜘蛛池模板: 久久这里只有 | 九九99精品 | 中文字幕欧美一区二区 | 影音先锋亚洲资源 | 欧美中文字幕在线观看 | 成人在线免费视频 | 精产国产伦理一二三区 | 国产精品久久久久久久久久久久久 | 国产色爽 | 亚洲视频区 | 色视频一区二区 | 久久精品一 | 国产精品1区 | 欧美在线成人影院 | 久久久91| 91视频一区二区 | 国产精品久久精品 | 精品一区久久 | 国产精品国产a | 成人区精品一区二区婷婷 | 麻豆av一区二区三区久久 | 成在线人视频免费视频 | 爱草在线 | 在线观看成人小视频 | 看av网址 | 国产欧美日韩在线一区 | 综合久久av| 久久伊人亚洲 | 国产精品爱久久久久久久 | 久久免费精品视频 | 欧美黄色片 | 免费av在线 | 女女百合av大片一区二区三区九县 | 一级黄色录像片子 | 殴美成人在线视频 | 99热最新网址 | 婷婷久 | 久久激情视频 | 国产精产国品一二三产区视频 | 日韩精品在线观看免费 | 少妇无套高潮一二三区 |