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

相关推荐
u0109272711 小时前
RESTful API设计最佳实践(Python版)
jvm·数据库·python
我材不敲代码5 小时前
Python实现打包贪吃蛇游戏
开发语言·python·游戏
0思必得07 小时前
[Web自动化] Selenium处理动态网页
前端·爬虫·python·selenium·自动化
韩立学长7 小时前
【开题答辩实录分享】以《基于Python的大学超市仓储信息管理系统的设计与实现》为例进行选题答辩实录分享
开发语言·python
qq_192779877 小时前
高级爬虫技巧:处理JavaScript渲染(Selenium)
jvm·数据库·python
u0109272717 小时前
使用Plotly创建交互式图表
jvm·数据库·python
爱学习的阿磊7 小时前
Python GUI开发:Tkinter入门教程
jvm·数据库·python
Imm7778 小时前
中国知名的车膜品牌推荐几家
人工智能·python
tudficdew8 小时前
实战:用Python分析某电商销售数据
jvm·数据库·python
sjjhd6528 小时前
Python日志记录(Logging)最佳实践
jvm·数据库·python