command not found: dirname
Hello
Anytime I open my terminal, I get this.
__add_sys_prefix_to_path:6: command not found: dirname
__add_sys_prefix_to_path:7: command not found: dirname
Can I get some help?
MacBook Pro with Touch Bar
Hello
Anytime I open my terminal, I get this.
__add_sys_prefix_to_path:6: command not found: dirname
__add_sys_prefix_to_path:7: command not found: dirname
Can I get some help?
MacBook Pro with Touch Bar
Check preferences in Terminal for something entered in the command to run or in the default theme.
You have somehow installed something that is trying to use Linux commands when the shell opens.
It could also be in your .zshrc file.
You have installed something called Conda or possibly Anaconda related to Python.
Are you aware of what it was? You should ask whoever you downloaded it from.
There is nothing in your .zshrc file that is calling dirname.
There are two places in Terminal Preferences they might have added that command,
in the General tab, Shells open with…
In the Default Theme, Shell tab, Startup
If there isn't anything in those, it must be running from one of the additions to the .zshrc by Anaconda.
See if they have a package written for Unix instead of Linux.
Also, check the prompts that required it in .zshrc file.
dirname is no such command.
If you wanted to run this command, follow the instructions in https://brew.sh then type:
brew install dirname
or edit the .zshrc file.
Thanks for your answer, I really appreciate it.
I'm very new to using the terminal and all so this confuses me a bit. However, this is what is in my .zshrc file. Maybe you could help me troubleshoot it and what to change?
export PATH=/Library/Frameworks/Python.framework/Versions/3.8/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/abk/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/abk/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/abk/opt/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/abk/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
I would really appreciate the help.
Hi, thanks again. yes, I do know and use Anaconda navigator for my Jupyter Notebooks.
command not found: dirname