Open NinjaCats opened 4 months ago
I encountered the same issue:
warning libmamba Could not find Windows version by calling 'ver'
Please file a bug report.
Error: ��֧�ָ�����
warning libmamba Not setting long path registry key; Windows version must be at least 10 with the fall 2016 "Anniversary update" or newer.
After a slight research, the official Microsoft documentation states that the ver
command is only available in Windows CMD, while the installation script can only be executed in PowerShell, which conflict itself.
Fortunately, Microsoft suggests another official way to obtain the Windows version in PowerShell by going through:
> $PSVersionTable.BuildVersion
Major Minor Build Revision
----- ----- ----- --------
10 0 19041 4842
There are tons of ways to obtain the System version: https://stackoverflow.com/questions/7330187/how-to-find-the-windows-version-from-the-powershell-command-line
After a brief inspection, I found that the issue was introduced to mamba by https://github.com/mamba-org/mamba/pull/3248 after Mar 28 with this line:
The workaround should be running the following command in CMD:
C:\Users\
${user}\AppData\Local\micromamba\micromamba.exe shell init -s powershell -p C:\Users\${user}\micromamba
dedicated.
So the better approach to this Pull Request would be to have https://github.com/mamba-org/mamba/blob/327534724ab7c5c161a4f95349e440e1b50a5692/libmamba/src/util/os_win.cpp#L194 to distinguish different executable environment and use ver
for CMD as well as using $PSVersionTable.BuildVersion
in PowerShell.
I am not a CPP expert, I could help on contributing the fix by adding extra functions to handle the cases, but may need maintainers helps.
EDIT1:
Nevermind, I found the init functionality is broken too no matter running with:
micromamba shell init --shell powershell --root-prefix=~/micromamba
warning libmamba Could not find Windows version by calling 'ver'
Please file a bug report.
Error: ��֧�ָ�����
warning libmamba Not setting long path registry key; Windows version must be at least 10 with the fall 2016 "Anniversary update" or newer.
or what I mentioned:
C:\Users\
${user}\AppData\Local\micromamba\micromamba.exe shell init -s powershell -p C:\Users\${user}\micromamba
EDIT2:
I am lost, running directly in CMD is broken too. I am switching to Linux to try again...
C:\Users\Yuna>micromamba shell init --shell cmd.exe --root-prefix=~/micromamba
Setting cmd.exe AUTORUN to: "C:\Users\Yuna\micromamba\condabin\mamba_hook.bat"
warning libmamba Could not find Windows version by calling 'ver'
Please file a bug report.
Error: ��֧�ָ�����
warning libmamba Not setting long path registry key; Windows version must be at least 10 with the fall 2.
Troubleshooting docs
Anaconda default channels
How did you install Mamba?
Micromamba
Search tried in issue tracker
type::bug
Latest version of Mamba
Tried in Conda?
Not applicable
Describe your issue
I receive that bug;
conda was not installed on my computer
Shell Ver: PowerShell 7.4.3 System Ver: Microsoft Windows [Ver 10.0.19045.4651]
Discrabe
that command the found in powershell
and run cmd /c ver
mamba info / micromamba info
Logs
No response
environment.yml
No response
~/.condarc
No response