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

相关推荐
databook4 分钟前
用 SymPy 解决 Manim 曲线绘制速度不均的问题
python·数学·动效
宇宙无敌程序员菜鸟5 分钟前
浅玩CRUD Agent
python
程序大视界5 分钟前
【Python系列课程】Python入门教程
开发语言·人工智能·python
morning_judger13 分钟前
Agent系列(二)-记忆系统的设计
开发语言·python·机器学习
RSTJ_162515 分钟前
PYTHON+AI LLM DAY SIXTY-ONE
开发语言·python
TickDB34 分钟前
智谱GLM-4 接金融数据:工具描述多写三个字,模型少犯一类错
人工智能·python·websocket·行情数据 api·行情 api
用户03321266636742 分钟前
使用 Python 在 Excel 中查找并高亮显示
python
sugar__salt1 小时前
Prompt工程实战指南:规范设计、LLM接口封装与避坑技巧
人工智能·python·prompt
码界筑梦坊2 小时前
282-基于Python的豆瓣音乐可视化分析推荐系统
开发语言·python·信息可视化·数据分析·flask·vue
LJianK12 小时前
java多态
java·开发语言·python