Skip to content

Commit abe0866

Browse files
authored
Merge pull request #2616 from astaric/install-conda-on-windows
conda_installer: Include conda in environment
2 parents 425ff7a + 08406da commit abe0866

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

scripts/windows/condainstall.bat

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ if not exist "%PREFIX%\python.exe" (
2323
"%CONDA%" install --yes --copy --quiet --prefix "%PREFIX%" "%CD%\%%f" ^
2424
|| exit /b !ERRORLEVEL!
2525
)
26+
27+
rem # `conda create` does not add a conda.bat script when used
28+
rem # with a local package, we need to create it manually.
29+
echo @echo off > "%PREFIX%\Scripts\conda.bat"
30+
echo call "%CONDA%" %%* >> "%PREFIX%\Scripts\conda.bat"
31+
32+
rem # Create .condarc file that includes conda-forge channel
33+
rem # We need it so add-ons can be installed from conda-forge
34+
echo Appending conda-forge channel
35+
echo channels: > "%PREFIX%\.condarc"
36+
echo - defaults >> "%PREFIX%\.condarc"
37+
echo - conda-forge >> "%PREFIX%\.condarc"
2638
)
2739

2840
for %%f in ( *.tar.bz2 ) do (

0 commit comments

Comments
 (0)