Open mjastro opened 1 year ago
I may have encountered the same/related issue during Miniforge installation on M1 Mac. When it reaches the prompt to ask whether to run conda init
, after a 'yes' reply, it briefly displays a password input, but then fails before any input is given.
...
installation finished
Do you wish the installer to initialize Miniforge3
by running conda init? [yes|no]
[no] >>> yes
Password:
\# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/Users/XXXX/miniforge3/lib/python3.10/site-packages/conda/exceptions.py", line 1129, in __call__
return func(*args, **kwargs)
File "/Users/XXXX/miniforge3/lib/python3.10/site-packages/conda/cli/main.py", line 86, in main_subshell
exit_code = do_call(args, p)
File "/Users/XXXX/miniforge3/lib/python3.10/site-packages/conda/cli/conda_argparse.py", line 93, in do_call
return getattr(module, func_name)(args, parser)
File "/Users/XXXX/miniforge3/lib/python3.10/site-packages/conda/cli/main_init.py", line 50, in execute
return initialize(context.conda_prefix, selected_shells, for_user, args.system,
File "/Users/XXXX/miniforge3/lib/python3.10/site-packages/conda/core/initialize.py", line 119, in initialize
run_plan_elevated(plan2)
File "/Users/XXXX/miniforge3/lib/python3.10/site-packages/conda/core/initialize.py", line 688, in run_plan_elevated
result = subprocess_call(
File "/Users/XXXX/miniforge3/lib/python3.10/site-packages/conda/gateways/subprocess.py", line 100, in subprocess_call
stdout, stderr = process.communicate(input=stdin)
File "/Users/XXXX/miniforge3/lib/python3.10/subprocess.py", line 1152, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "/Users/XXXX/miniforge3/lib/python3.10/subprocess.py", line 1983, in _communicate
input_view = memoryview(self._input)
TypeError: memoryview: a bytes-like object is required, not 'str'
`$ /Users/XXXX/miniforge3/bin/conda init zsh`
Environment info:
active environment : None
user config file : /Users/XXXX/.condarc
populated config files : /Users/XXXX/miniforge3/.condarc
conda version : 22.9.0
conda-build version : not installed
python version : 3.10.6.final.0
virtual packages : __osx=13.1=0
__unix=0=0
__archspec=1=arm64
base environment : /Users/XXXX/miniforge3 (writable)
conda av data dir : /Users/XXXX/miniforge3/etc/conda
conda av metadata url : None
channel URLs : https://conda.anaconda.org/conda-forge/osx-arm64
https://conda.anaconda.org/conda-forge/noarch
package cache : /Users/XXXX/miniforge3/pkgs
/Users/XXXX/.conda/pkgs
envs directories : /Users/XXXX/miniforge3/envs
/Users/XXXX/.conda/envs
platform : osx-arm64
user-agent : conda/22.9.0 requests/2.28.1 CPython/3.10.6 Darwin/22.2.0 OSX/13.1
UID:GID : 501:20
netrc file : None
EDIT: I found a workaround was to run the installation scripts without initializing the shell at the end. There is some info on how to activate the base environment that is printed in response.
After activating base env, running sudo conda init zsh
worked. The sudo
was required - it failed in the same way as previously without.
I'm curious to understand what the advantage of installing miniforge through homebrew is? I'm not sure if it is related, but it might be due to that.
I'm hitting the same problem on linux (bash as shell). miniforge unpacks fine. I tell it it not run conda init
and it tells me how to activate conda in that shell. I do that and try conda init
but it fails:
(base) no change /home/submit/hgunther/miniforge3/condabin/conda
no change /home/submit/hgunther/miniforge3/bin/conda
no change /home/submit/hgunther/miniforge3/bin/conda-env
no change /home/submit/hgunther/miniforge3/bin/activate
no change /home/submit/hgunther/miniforge3/bin/deactivate
no change /home/submit/hgunther/miniforge3/etc/profile.d/conda.sh
no change /home/submit/hgunther/miniforge3/etc/fish/conf.d/conda.fish
no change /home/submit/hgunther/miniforge3/shell/condabin/Conda.psm1
no change /home/submit/hgunther/miniforge3/shell/condabin/conda-hook.ps1
no change /home/submit/hgunther/miniforge3/lib/python3.10/site-packages/xontrib/conda.xsh
no change /home/submit/hgunther/miniforge3/etc/profile.d/conda.csh
modified /home/submit/hgunther/.bashrc
==> For changes to take effect, close and re-open your current shell. <==
(base) [sudo] password for hgunther:
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/home/submit/hgunther/miniforge3/lib/python3.10/site-packages/conda/exceptions.py", line 1129, in __call__
return func(*args, **kwargs)
File "/home/submit/hgunther/miniforge3/lib/python3.10/site-packages/conda/cli/main.py", line 86, in main_subshell
exit_code = do_call(args, p)
File "/home/submit/hgunther/miniforge3/lib/python3.10/site-packages/conda/cli/conda_argparse.py", line 93, in do_call
return getattr(module, func_name)(args, parser)
File "/home/submit/hgunther/miniforge3/lib/python3.10/site-packages/conda/cli/main_init.py", line 50, in execute
return initialize(context.conda_prefix, selected_shells, for_user, args.system,
File "/home/submit/hgunther/miniforge3/lib/python3.10/site-packages/conda/core/initialize.py", line 119, in initialize
run_plan_elevated(plan2)
File "/home/submit/hgunther/miniforge3/lib/python3.10/site-packages/conda/core/initialize.py", line 688, in run_plan_elevated
result = subprocess_call(
File "/home/submit/hgunther/miniforge3/lib/python3.10/site-packages/conda/gateways/subprocess.py", line 100, in subprocess_call
stdout, stderr = process.communicate(input=stdin)
File "/home/submit/hgunther/miniforge3/lib/python3.10/subprocess.py", line 1154, in communicate
stdout, stderr = self._communicate(input, endtime, timeout)
File "/home/submit/hgunther/miniforge3/lib/python3.10/subprocess.py", line 1985, in _communicate
input_view = memoryview(self._input)
TypeError: memoryview: a bytes-like object is required, not 'str'
`$ /home/submit/hgunther/miniforge3/bin/conda init`
environment variables:
CIO_TEST=<not set>
CONDA_DEFAULT_ENV=base
CONDA_EXE=/home/submit/hgunther/miniforge3/bin/conda
CONDA_PREFIX=/home/submit/hgunther/miniforge3
CONDA_PROMPT_MODIFIER=(base)
CONDA_PYTHON_EXE=/home/submit/hgunther/miniforge3/bin/python
CONDA_ROOT=/home/submit/hgunther/miniforge3
CONDA_SHLVL=1
CURL_CA_BUNDLE=<not set>
MODULEPATH=/usr/share/Modules/modulefiles:/etc/modulefiles
PATH=/home/submit/hgunther/miniforge3/bin:/home/submit/hgunther/miniforge3/
condabin:/usr/lib64/qt-
3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/submit
/hgunther/.local/bin:/home/submit/hgunther/bin
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
active environment : base
active env location : /home/submit/hgunther/miniforge3
shell level : 1
user config file : /home/submit/hgunther/.condarc
populated config files : /home/submit/hgunther/miniforge3/.condarc
conda version : 22.9.0
conda-build version : not installed
python version : 3.10.8.final.0
virtual packages : __linux=3.10.0=0
__glibc=2.17=0
__unix=0=0
__archspec=1=x86_64
base environment : /home/submit/hgunther/miniforge3 (writable)
conda av data dir : /home/submit/hgunther/miniforge3/etc/conda
conda av metadata url : None
channel URLs : https://conda.anaconda.org/conda-forge/linux-64
https://conda.anaconda.org/conda-forge/noarch
package cache : /home/submit/hgunther/miniforge3/pkgs
/home/submit/hgunther/.conda/pkgs
envs directories : /home/submit/hgunther/miniforge3/envs
/home/submit/hgunther/.conda/envs
platform : linux-64
user-agent : conda/22.9.0 requests/2.28.1 CPython/3.10.8 Linux/3.10.0-1160.45.1.el7.x86_64 centos/7.9.2009 glibc/2.17
UID:GID : 89328:89328
netrc file : None
offline mode : False
An unexpected error has occurred. Conda has prepared the above report.
If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers? [y/N]:
Timeout reached. No report sent.
(base)
I found that due to some setup error, my .bashrc
is owned by root (which presumably is why it's asking me for my sudo password). So, I suspect that that's the root cause why it fails, and it then just does not handle that gracefully. I'll report back when I can test that - need the sysadmins to give me access to my own files...
Making ~/.bashrc
writable solved the issue.
Since my error looked exactly the same as reported originally on the top of this thread, the same might well be the cause for the issue on Mac.
I had this issue too on Mac M1 on zsh, fish and bash. The sudo
workaround worked for me fix the issue
@hamogu: My .bash_profile
, fish.config
and .zshrc
were all owned by me though, not by root, so that was not the issue for me.
PS. Issues relating to the installation of miniforge are rarely cross platform. Please open a new issue instead of hijacking somebody else's question.
I'm somewhat tempted to close this issue because unless a homebrew developer can point us to something actionable, you should discuss your specific issues with then.
I'm somewhat tempted to close this issue because unless a homebrew developer can point us to something actionable, you should discuss your specific issues with then.
I should add that I did not install miniforge using homebrew, but the scripts available on the repo.
@drsamchong I think your issue is more similar to what the discussion in https://github.com/conda-forge/miniforge/issues/412 has become.
Again, I do think that installation issues are seldom "the same" even if they appear to be so at first glance.
Please try to follow the troubleshooting steps I've laid out in https://github.com/conda-forge/miniforge/issues/412#issuecomment-1416799692
And open a new issue. Again, not many of us have OSX computers handy, thus it is critical that you give us as much info as possible to help us debug.
Solution to issue cannot be found in the documentation.
Issue
Hi, I was trying to reinstall miniforge for my laptop (Mac, M1 silicon), but I find
conda init
does not work properly with the latest version.I wonder whether the latest version has a bug or a problem on my side... the error message is like the following when I do
conda init
:`
Thanks in advance for any help you could offer!
Best, Minju
Installed packages
Environment info