可以打包 Anaconda 以进行便携式零配置安装吗?
问题描述
我想将 Python 部署给我组织中的非程序员,以便安装过程完全包括从 Perforce 同步一个目录,并且可能运行一个设置环境变量的批处理文件.
I'd like to deploy Python to non-programmers in my organization such that the install process consists entirely of syncing a directory from Perforce and maybe running one batch file that sets up environment variables.
是否可以将 Miniconda 打包成只需复制一个目录就可以安装"?它的安装程序是做什么的?
Is it possible to package up Miniconda in such a way it can be "installed" just by copying down a directory? What does its installer do?
这样做的原因是,我想通过为我们的艺术家提供可以从命令行运行的 Python 脚本来自动执行某些任务.但是我需要将解释器安装到他们的机器上,而不必运行任何类型的安装程序或卸载程序,或者任何可能以非幂等方式失败的进程.设置环境变量的批处理文件很好,因为它是幂等的.可能中途失败并将工作站置于需要干预修复的状态的安装程序不是.
The reason for this is that I'd like to automate certain tasks for our artists by providing them with Python scripts they can run from the commandline. But I need to get the interpreter onto their machines without having to run any kind of installer or uninstaller, or any process that can fail in a non-idempotent way. A batch file that sets up env vars is fine, because it is idempotent. An installer that can fail partway through and put the workstation into a state requiring intervention to fix is not.
特别是,为每个人的安装添加一个库应该包括我在我的办公桌上使用 conda
,将随后的目录检查到 P4,然后让艺术家使用他们的下一个 自动拾取它p4 同步
.
In particular, adding a library to everyone's install should consist of my using conda
on my desk, checking the ensuing directory into P4, and then letting artists pick it up automatically with their next p4 sync
.
我查看了 WinPython,但 1.4GB 太大了.可移植 Python 已失效.
I looked at WinPython, but at 1.4GB it is too large. Portable Python is defunct.
我们是一家专门的 Windows 商店,因此不需要 Linux 或 Mac 便携式解决方案.
We are exclusively a Windows shop, so do not need Linux- or Mac-portable solutions.
解决方案
您可以使用 静默安装模式 创建一个完全可移植的 Miniconda 安装(250MB 对于 v.4.3.21 windows x64).
You can use the silent install mode to create a fully portable Miniconda install (250MB for v.4.3.21 windows x64).
Miniconda3-latest-Windows-x86_64.exe /InstallationType=JustMe /AddToPath=0 /RegisterPython=0 /NoRegistry=1
(解决方案in this issue)
相关文章