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

相关推荐
老孟说禅9 分钟前
自动化测试入门(一)
开发语言·python
miofly16 分钟前
GitHub 今日推荐|Snapintosh:用 ARM EL2 监控器骗过内核,让骁龙芯片笔记本跑 macOS
python·开源·github
打工仔折腾 AI22 分钟前
Linux 网络编程:从零掌握 TCP Socket 编程与 C++ 实战落地
linux·网络·人工智能·后端·python·tcp/ip·性能优化
我命由我1234543 分钟前
Python 开发 - Python 项目部署(Windows 与 Linux)
java·linux·windows·后端·python·java-ee·python3.11
Zella折耳根1 小时前
实验2进阶版数据看板的设计与实现
python
databook1 小时前
让 LLM 输出不再失控:用 Pydantic 校验大模型输出
人工智能·python·llm
jingcairensheng1 小时前
vscode 配置Python虚拟环境基于扩展和原生miniconda的区别
ide·vscode·python
“AI国潮设计-小江”1 小时前
《【AIGC实战】Python+SDXL批量生成“英歌舞草莓抱抱卷蛋糕”IP插牌立牌方案,锁定角色一致性,甜品插件化落地》
开发语言·人工智能·python·prompt·aigc
LMT流氓兔1 小时前
第五单元——第7课:工具读取用户身份,而不是让模型填写身份
python·langchain
FlyWIHTSKY1 小时前
Agent阶段一:基础夯实
python·ai·fastapi