-
-
Notifications
You must be signed in to change notification settings - Fork 47
/
install_miniconda.bat
executable file
·49 lines (44 loc) · 1.77 KB
/
install_miniconda.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
:: Configure batch
@echo on
:: Miniconda Config:
set "MINICONDA_VERSION=4.8.2"
set "MINICONDA_MD5=20d6bd9b3bd62f1fd874315b6b38c159"
set "MINICONDA_INSTALLER=%USERPROFILE%\miniconda.exe"
set "MINICONDA_DIR=%USERPROFILE%\miniconda"
set "MINICONDA_URL=https://repo.anaconda.com/miniconda/Miniconda3-py37_%MINICONDA_VERSION%-Windows-x86_64.exe"
:: Install Miniconda.
powershell -Command "(New-Object Net.WebClient).DownloadFile('%MINICONDA_URL%', '%MINICONDA_INSTALLER%')"
if errorlevel 1 exit 1
( certutil -hashfile "%MINICONDA_INSTALLER%" md5 | findstr /v ":" ) > "%MINICONDA_INSTALLER%.md5"
if errorlevel 1 exit 1
type "%MINICONDA_INSTALLER%.md5"
if errorlevel 1 exit 1
set /p MINICONDA_MD5_FOUND=<%MINICONDA_INSTALLER%.md5
if errorlevel 1 exit 1
set "MINICONDA_MD5_FOUND=%MINICONDA_MD5_FOUND: =%"
if errorlevel 1 exit 1
echo "%MINICONDA_MD5_FOUND%" | findstr /c:"%MINICONDA_MD5%"
if errorlevel 1 exit 1
start /wait "" %MINICONDA_INSTALLER% /InstallationType=JustMe ^
/AddToPath=0 ^
/RegisterPython=0 ^
/S ^
/D=%MINICONDA_DIR%
if errorlevel 1 exit 1
del "%MINICONDA_INSTALLER%"
if errorlevel 1 exit 1
del "%MINICONDA_INSTALLER%.md5"
if errorlevel 1 exit 1
:: Activate conda.
call "%MINICONDA_DIR%\Scripts\activate.bat"
if errorlevel 1 exit 1
:: Configure conda.
conda.exe config --set show_channel_urls true
if errorlevel 1 exit 1
conda.exe config --set auto_update_conda false
if errorlevel 1 exit 1
conda.exe config --set add_pip_as_python_dependency true
if errorlevel 1 exit 1
:: Patch VS 2008 for 64-bit support.
conda.exe install --quiet --yes "conda-forge::vs2008_express_vc_python_patch"
call setup_x64