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

conda 環境在 conda env 列表中沒有可見的名稱 - 如何

conda environment has no name visible in conda env list - how do I activate it at the shell?(conda 環境在 conda env 列表中沒有可見的名稱 - 如何在 shell 中激活它?)
本文介紹了conda 環境在 conda env 列表中沒有可見的名稱 - 如何在 shell 中激活它?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我在 anaconda-navigator 中創建了一個名為 B3 的環境.如果從導航器中啟動它就可以正常工作.

I have created an environment called B3 inside anaconda-navigator. It works fine if launched from within navigator.

但是,當我想在 shell 中激活它時,我得到找不到 environmnet B3".

However, when I want to activate it at the shell, I get 'could not find environmnet B3.'

如果我使用 conda env list,環境是可見的,但它的名稱是空白的.如果我嘗試改用文件路徑,我會得到不是 conda 環境".

If I use conda env list, the environment is visible but its name is blank. If I try using the file path instead, I get 'Not a conda environment.'

為什么缺少名稱,如何從 shell 激活它?

Why is the name missing, and how can I activate it from the shell?

推薦答案

基于名稱的 Conda 環境引用僅適用于位于 envs_dirs 配置選項中列出的目錄之一的環境(請參閱 <代碼>conda config --describe envs_dirs).默認情況下,這對應于 Conda 安裝中的 envs/ 子目錄.如果您在這些目錄之一之外創建環境,則不能使用名稱來引用它.相反,必須通過它的路徑來激活它:

Name-based reference of Conda environments only works for environments located in one of the directories listed in the envs_dirs configuration option (see conda config --describe envs_dirs). By default this corresponds to the envs/ subdirectory in the Conda installation. If you create an env outside of one of these directories, then you cannot use a name to reference it. Instead, one must activate it by its path:

conda activate /home/julianhatwell/anaconda3/envs/B3

請注意,OP 最初有一個錯字(anaconda2 應該是 anaconda3).在指出這一點后(見問題的評論),提問者要求回答:

Note that OP originally had a typo (anaconda2 should have been anaconda3). After pointing this out (see comments to question), the questioner instead requested an answer to:

如何將無名環境轉換為有名環境?"

以下是啟用基于名稱的激活的可能方法.

The following are possible ways to enabling name-based activation.

使用 conda activate B3 的一個選項是在默認目錄中重新創建 B3 環境.您可以使用 --clone 標志來完成此操作.

One option to use conda activate B3, is to recreate your B3 env in the default directory. You can use the --clone flag to accomplish this.

conda create --clone path/to/the/nameless_env -n named_env

選項2:添加父目錄

或者,您可以將相關環境的父目錄添加到 envs_dirs 配置選項.

conda config --append envs_dirs /path/to/the/parent_dir

選項 3:符號鏈接

另一種可能性是在 envs_dirs 文件夾中創建一個符號鏈接到環境文件夾.它似乎有效,但它不是一種常見的做法,因此它可能具有未報告的缺點.

Option 3: Symbolic Link

Another possibility is to create a symbolic link in one to the envs_dirs folders to the environment folder. It seems to work, but it is not a common practice, so it may have downsides that are unreported.

這篇關于conda 環境在 conda env 列表中沒有可見的名稱 - 如何在 shell 中激活它?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

相關文檔推薦

How to install Selenium in a conda environment?(如何在 conda 環境中安裝 Selenium?)
get the CUDA and CUDNN version on windows with Anaconda installe(使用 Anaconda installe 在 Windows 上獲取 CUDA 和 CUDNN 版本)
How can I download Anaconda for python 3.6(如何下載適用于 python 3.6 的 Anaconda)
Using two different Python Distributions(使用兩個不同的 Python 發行版)
How can I install Anaconda aside an existing pyenv installation on OSX?(除了 OSX 上現有的 pyenv 安裝之外,如何安裝 Anaconda?)
Permanently set Python path for Anaconda within Cygwin(在 Cygwin 中為 Anaconda 永久設置 Python 路徑)
主站蜘蛛池模板: 亚洲一区二区av | 99视频在线播放 | 国产精品性做久久久久久 | 神马久久香蕉 | 爱综合| 久久国产日韩 | 国产精品福利一区二区三区 | 国产精品一区二区三区久久久 | 欧美日韩国产精品一区 | 超黄毛片 | 99久久国产免费 | 欧美日韩久久久 | 国产精彩视频一区 | 久久久99国产精品免费 | 精品美女视频在线观看免费软件 | 伊人最新网址 | 亚洲精彩视频在线观看 | 欧美日韩网站 | 免费在线a视频 | 国产精品久久久久久久模特 | 国产ts人妖系列高潮 | av电影手机在线看 | 精品欧美一区二区在线观看 | 日本电影一区二区 | 人人玩人人添人人澡欧美 | 国产精品高潮呻吟久久av野狼 | 久色| 国产欧美日韩视频 | 在线视频中文字幕 | 少妇黄色 | 自拍偷拍欧美 | 精品一区在线 | 三区在线| www国产精| 精品亚洲一区二区三区 | 国产精品视频免费 | 日韩欧美在线观看 | 永久www成人看片 | www.精品一区 | 羞羞色在线观看 | 黄色一级大片在线免费看产 |