conda手动初始化

问题:环境中存在conda但是conda无法使用

方法: 进入到anaconda目录下, 进入bin目录, 然后执行

bash 复制代码
 source activate

要想启动时自动进入conda环境, 需要在 ~/.bashrc中添加如下命令

bash 复制代码
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/root/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/root/miniconda3/etc/profile.d/conda.sh" ]; then
        . "/root/miniconda3/etc/profile.d/conda.sh"
    else
        export PATH="/root/miniconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

然后 source ~/.bashrc

相关推荐
羸弱的穷酸书生6 分钟前
国网 i1协议 python实现
开发语言·python
weixin_462022356 分钟前
RAW-Adapter: Adapting Pre-trained Visual Model to Camera RAW Images
python·计算机视觉
电子硬件笔记8 分钟前
Python语言编程导论第三章 编写程序
开发语言·python·编辑器
布谷歌8 分钟前
在java中实现c#的int.TryParse方法
java·开发语言·python·c#
B站计算机毕业设计之家1 小时前
基于大数据热门旅游景点数据分析可视化平台 数据大屏 Flask框架 Echarts可视化大屏
大数据·爬虫·python·机器学习·数据分析·spark·旅游
周纠纠1 小时前
附录1:中文切词
python
Cricyta Sevina1 小时前
Java Collection 集合进阶知识笔记
java·笔记·python·collection集合
零度@2 小时前
Java中Map的多种用法
java·前端·python
550A2 小时前
如何修改kagglehub的数据集默认下载路径
python