Open timmermansjoy opened 1 year ago
I see that the bug tag got moved to 3rdparty. So I also tried to install It from the script in Unix-like platform after this, I just get the same behaviour. also removed conda piece in the .zshrc a couple of times. but still gives issues there
Thank you for trying to install it using our recommendations. I truly appreciate it. I don't have a mac so troubleshooting is difficult for me.
Can you try one more thing:
/Users/joy/mambafore/
conda
in your /Users/joy/.zshrc
echo $SHELL
env | grep CONDA
Please check the output of env
for anything sensitive you might want to remove. I'm mostly interested in any variables that are prefixed with CONDA that may exist.
Then can you try to reinstall.
After the reinstall, please show us the contents .zshrc file that you've shown before.
first pic of everything deleted
second pic is after installing conda with the unix like instructions and afterwards
the full file is
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
export DOTFILES=$HOME/.dotfiles
export HOMEBREW_BREWFILE=~/.dotfiles/specific/homebrew/Brewfile
SYSTEM_CONFIG=$DOTFILES/basic/system/index.zsh
export PATH="/opt/homebrew/bin:$PATH"
export PATH="/opt/homebrew/sbin:$PATH"
# https://unix.stackexchange.com/a/151896/148053 - I don't understand, but it is what it is
local function _source () {
local -r FILE="$1"
shift
source "$FILE" "$@"
}
local function source_local () {
if [[ -a $DOTFILES/.local ]]; then
_source $DOTFILES/.local
fi
}
local function source_system () {
_source "$SYSTEM_CONFIG"
}
function source_non_system () {
typeset -U FILES
FILES=($DOTFILES/basic/*/index.zsh $DOTFILES/specific/*/index.zsh)
for FILE in $FILES; do
if [ $FILE != $SYSTEM_CONFIG ]; then
_source $FILE
fi
done
unset FILES
}
function source_extensions () {
typeset -U FILES
if find $DOTFILES/extensions -name 'index.zsh' -not -path '*.git*' &> /dev/null; then
# include any extensions if present
FILES=($FILES $DOTFILES/extensions/*/*/index.zsh)
fi
for FILE in $FILES; do
if [ $FILE != $SYSTEM_CONFIG ]; then
_source $FILE
fi
done
unset FILES
}
source_local # load local-only variables (not commited)
source_system # first source the system config, which sets critical variables...
source_non_system # ...then sources other config files
source_extensions
# initialize autocomplete here, otherwise functions won't be loaded
autoload -U compinit
compinit
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# To customize prompt, run `p10k configure` or edit ~/.dotfiles/specific/oh-my-zsh/p10k.zsh.symlink.
[[ ! -f ~/.dotfiles/specific/oh-my-zsh/p10k.zsh.symlink ]] || source ~/.dotfiles/specific/oh-my-zsh/p10k.zsh.symlink
# helps with some wierdness in pip
export LDFLAGS="-L/opt/homebrew/opt/freetds/lib -L/opt/homebrew/opt/openssl@3/lib"
export CFLAGS="-I/opt/homebrew/opt/freetds/include"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/joy/mambaforge/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/joy/mambaforge/etc/profile.d/conda.sh" ]; then
. "/Users/joy/mambaforge/etc/profile.d/conda.sh"
else
export PATH="/Users/joy/mambaforge/bin:$PATH"
fi
fi
unset __conda_setup
if [ -f "/Users/joy/mambaforge/etc/profile.d/mamba.sh" ]; then
. "/Users/joy/mambaforge/etc/profile.d/mamba.sh"
fi
# <<< conda initialize <<<
and full installation can be found here: https://github.com/timmermansjoy/dotfiles.git
I'm really not sure. sorry. this is beyond me. :/ You seem to have done everything right according to me.
@conda-forge/help-osx-arm64 (sorry there doesn't seem to be a generic help osx group)
I don’t know what that power 10k shell thingy is but the warning makes me wonder if it’s swallowing some functionality that the conda initializer expects? Have you tried either commenting that out or putting the conda stuff above it?
@erykoff its just a theme for the terminal https://github.com/romkatv/powerlevel10k I doubt it has influence
I'm having this issue as well. It looks like conda shell.zsh hook
is generating a script that looks like
export CONDA_EXE='/usr/local/Caskroom/miniforge/base/bin/conda'
export _CE_M=''
export _CE_CONDA=''
export CONDA_PYTHON_EXE='/usr/local/Caskroom/miniforge/base/bin/python'
# Copyright (C) 2012 Anaconda, Inc
# SPDX-License-Identifier: BSD-3-Clause
__conda_exe() (
"$CONDA_EXE" $_CE_M $_CE_CONDA "$@"
)
__conda_hashr() {
if [ -n "${ZSH_VERSION:+x}" ]; then
\rehash
elif [ -n "${POSH_VERSION:+x}" ]; then
: # pass
else
\hash -r
fi
}
__conda_activate() {
if [ -n "${CONDA_PS1_BACKUP:+x}" ]; then
# Handle transition from shell activated with conda <= 4.3 to a subsequent activation
# after conda updated to >= 4.4. See issue #6173.
PS1="$CONDA_PS1_BACKUP"
\unset CONDA_PS1_BACKUP
fi
\local ask_conda
ask_conda="$(PS1="${PS1:-}" __conda_exe shell.posix "$@")" || \return
\eval "$ask_conda"
__conda_hashr
}
__conda_reactivate() {
\local ask_conda
ask_conda="$(PS1="${PS1:-}" __conda_exe shell.posix reactivate)" || \return
\eval "$ask_conda"
__conda_hashr
}
conda() {
\local cmd="${1-__missing__}"
case "$cmd" in
activate|deactivate)
__conda_activate "$@"
;;
install|update|upgrade|remove|uninstall)
__conda_exe "$@" || \return
__conda_reactivate
;;
*)
__conda_exe "$@"
;;
esac
}
if [ -z "${CONDA_SHLVL+x}" ]; then
\export CONDA_SHLVL=0
# In dev-mode CONDA_EXE is python.exe and on Windows
# it is in a different relative location to condabin.
if [ -n "${_CE_CONDA:+x}" ] && [ -n "${WINDIR+x}" ]; then
PATH="$(\dirname "$CONDA_EXE")/condabin${PATH:+":${PATH}"}"
else
PATH="$(\dirname "$(\dirname "$CONDA_EXE")")/condabin${PATH:+":${PATH}"}"
fi
\export PATH
# We're not allowing PS1 to be unbound. It must at least be set.
# However, we're not exporting it, which can cause problems when starting a second shell
# via a first shell (i.e. starting zsh from bash).
if [ -z "${PS1+x}" ]; then
PS1=
fi
fi
conda activate base
The \
s didn't look right to me, so I removed them with a tweak to my .zshrc
and it seemed to fix it:
-__conda_setup="$(/usr/local/Caskroom/miniforge/base/bin/conda shell.zsh hook 2> /dev/null)"
+__conda_setup="$(/usr/local/Caskroom/miniforge/base/bin/conda shell.zsh hook 2> /dev/null | sed 's/\\//g')"
Same issue under MacOS Ventura 13.3.1.
When running conda init zsh
it is always:
no change /Users/******/.zshrc
Same issue under MacOS Ventura 13.3.1.
When running
conda init zsh
it is always:
no change /Users/******/.zshrc
Same issue, solved by uncommenting this block present in my zshrc:
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/opt/homebrew/Caskroom/miniconda/base/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh" ]; then
. "/opt/homebrew/Caskroom/miniconda/base/etc/profile.d/conda.sh"
else
export PATH="/opt/homebrew/Caskroom/miniconda/base/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
other workaround:
/opt/homebrew/Caskroom/miniconda/base/bin/conda shell.zsh hook >> ~/.zshrc
It would be beneficial to file this upstream in the conda/conda repo
Hello, I knew that installing any version of conda might cause trouble in Macs with the Apple Silicon, so I looked out there for clear instructions for my case (M1), and the steps in this repository worked for me, twice (MacBookPro M1 and Macmini M1): https://github.com/mrdbourke/m1-machine-learning-test#how-to-setup-a-tensorflow-environment-on-m1-m1-pro-m1-max-using-miniforge-shorter-version
When the installation is over, remember to write 'yes' to add conda to your PATH
The version of miniforge that the repos direct to seems to be the latest release of miniforge: https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh And the installation I did in Macmini a couple of days ago worked fine.
Solution to issue cannot be found in the documentation.
Issue
I have looked everywhere but nothing is working for me, when I install Miniforge on my Mac with home-brew and do conda init zsh afterwards, it puts the piece of code in my .zshrc file, but it still gives me an error that conda init has to be run. I'm doing this on the new M2 max MacBook, but also have tried it before with 2020 intel Mac and got the same thing, making me believe there is something going on with conda or my dot files but can't seem to figure out what.
Installed packages
Environment info