conda的安装可以更简化些,即使用batch文件,具体步骤如下:
-
新建文本文档,并改后缀名为.bat
-
使用文本编辑器编辑,并输入内容如下
@echo off
SET MINICONDA_INSTALLER_PATH=miniconda3_installer.exe
SET MINICONDA_URL=https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe
where conda >nul 2>nul
if %errorlevel% neq 0 (
echo "Conda is not installed"
echo "Downloading Conda installer..."
curl -o %MINICONDA_INSTALLER_PATH% %MINICONDA_URL%
echo "Installing Conda..."
start /wait "" %MINICONDA_INSTALLER_PATH% /InstallationType=JustMe /RegisterPython=0 /S /D=%UserProfile%\Miniconda3
echo "Conda has been installed!"
) else (
echo "Conda is already installed"
)
pause
- 双击bat文件,运行即可。