在特定目录中安装 conda 包

Installing conda packages in specific directory

有没有办法在指定目录下下载并安装 conda 包,而无需在该目录中创建 conda 环境?

如果只想下载包,可以给指定目录设置一个环境变量,使用--download-only开关

set CONDA_PKGS_DIRS=C:\temp

conda install zlib --download-only

dir c:\temp\
 Volume in drive C is Windows
 Volume Serial Number is DC83-883D

 Directory of c:\temp

...
07/13/2020  08:16 PM    <DIR>          zlib-1.2.11-h2fa13f4_1006
07/13/2020  08:16 PM           241,593 zlib-1.2.11-h2fa13f4_1006.tar.bz2