1 year ago

#370949

test-img

ramund

Question mark shows up in Terminal App after installing a package into a non-existent conda environment

(In case it's relevant: I have a MacBook Pro with an Apple M1 chip.)

I made a mistake installing a Python package into a conda virtual environment pymer4 that didn't exist (conda install -c ejolly -c conda-forge -c defaults pymer4 ). Then a question mark appears every time I open the terminal app in the /Users/apple directory. When I cd into any other directory, I don't see the question mark.

enter image description here

Old questions (like this) on this issue didn't have satisfying answers. Things I tried but failed:

  1. Deleting conda-related parts from .zshrc: The question mark disappears, but when I reinstall conda, it comes back. This solution isn't viable because I need conda.
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/apple/opt/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/Users/apple/opt/miniconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/apple/opt/miniconda3/etc/profile.d/conda.sh"
    else
        export PATH="/Users/apple/opt/miniconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<
  1. Deleting pymer4 from /Users/apple/.conda/environments.txt: The problem persists.
  2. Uninstalling the pymer4 package: Same as above.

I'm very confused why installing a package into a non-existing virtual environment would cause this. If anyone knows how I might fix it, very much appreciate it!!

macos

terminal

conda

apple-m1

miniconda

0 Answers

Your Answer

Accepted video resources