Import conda error traceback upon opening terminal

前端 未结 4 939

The below lines of code show up every time I open my terminal.

Traceback (most recent call last):
  File \"\", line 3, in 
ImportE         


        
4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-13 23:00

    I had the same problem The reason is in .bashrc:

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

    Problematic line:

    eval "$__conda_setup"
    

    Solved by replacing the whole block with:

    export PATH="/home/myname/app/miniconda3/bin:$PATH"
    

提交回复
热议问题