conda python Win10 Win11 powershell
- installing Miniconda3 on windows
-
latest miniconda_hashes
$Uri = "https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe" $OutFile = Join-Path "$HOME\Downloads" (Split-Path $Uri -Leaf) Invoke-WebRequest -Uri $Uri -OutFile $OutFile $compareOptions = @{ # Obtain sha256 hash from https://conda.io/en/latest/miniconda_hashes.html ReferenceObject = '00e8370542836862d4c790aa8966f1d7344a8addd4b766004febcb23f40e2914' DifferenceObject = (Get-FileHash $OutFile -Algorithm SHA256).Hash } $CompareHash = Compare-Object @compareOptions if ($CompareHash) { Write-Verbose "Hashes do not match for ${OutFile}" Write-Verbose "Obtain sha256 hash from https://conda.io/en/latest/miniconda_hashes.html" $CompareHash | Out-String | Write-Verbose } else { # start /wait "" $OutFile /InstallationType=JustMe /RegisterPython=1 /S /D=%UserProfile%\Miniconda3 $processOptions = @{ FilePath = "$OutFile" ArgumentList = "/InstallationType=JustMe /RegisterPython=1 /D=$HOME\Miniconda3" Wait = $true } Start-Process @processOptions } # Update conda (& "$HOME\miniconda3\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | ?{$_} | Invoke-Expression conda info --envs conda update conda -n base conda info --envs
conda python Win10 Win11 powershell
$childOptions = @{ # Obtain from `conda info --envs`. Path = 'C:\Users\jdfen\Github\pyedna\.tox' Exclude 'log', '.tmp', 'dist' } Get-ChildItem @childOptions | ForEach-Object -Process { conda env remove -p $_.FullName }