Python Anaconda 可以打包用于便携式零配置安装吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/39984611/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-19 23:02:24  来源:igfitidea点击:

Can Anaconda be packaged for a portable zero-configuration install?

pythonanaconda

提问by Crashworks

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.

我想将 Python 部署到我组织中的非程序员,以便安装过程完全包括从 Perforce 同步目录,并可能运行一个设置环境变量的批处理文件。

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?

是否可以将 Miniconda 打包成这样一种方式,它可以通过复制目录来“安装”?它的安装程序是做什么的?

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.

这样做的原因是我想通过为我们的艺术家提供可以从命令行运行的 Python 脚本来为他们​​自动执行某些任务。但是我需要将解释器安装到他们的机器上,而不必运行任何类型的安装程序或卸载程序,或者任何可能以非幂等方式失败的进程。设置 env vars 的批处理文件很好,因为它是幂等的。安装程序可能会在中途失败并将工作站置于需要干预才能修复的状态。

In particular, adding a library to everyone's install should consist of my using condaon my desk, checking the ensuing directory into P4, and then letting artists pick it up automatically with their next p4 sync.

特别是,向每个人的安装添加一个库应该包括我conda在我的桌子上使用,检查随后的目录到 P4,然后让艺术家用他们的下一个p4 sync.

I looked at WinPython, but at 1.4GB it is too large. Portable Python is defunct.

我查看了 WinPython,但在 1.4GB 时它太大了。便携式 Python 已不复存在。

We are exclusively a Windows shop, so do not need Linux- or Mac-portable solutions.

我们只是一家 Windows 商店,因此不需要 Linux 或 Mac 便携式解决方案。

采纳答案by FabienP

You can use the silent install modeto create a fully portable Miniconda install (250MB for v.4.3.21 windows x64).

您可以使用静默安装模式创建完全可移植的 Miniconda 安装(v.4.3.21 windows x64 为 250MB)。

Miniconda3-latest-Windows-x86_64.exe /InstallationType=JustMe /AddToPath=0 /RegisterPython=0 /NoRegistry=1

(Solution found in this issue)

在这个问题中找到的解决方案)

回答by subnivean

A little late to the party, but WinPython now includes a 'Zero' version with each release that has nearly all of the bloat removed. I believe the WinPython-64bit v3.6.3.0Zero release clocked in around 50-100MB, installed.

聚会有点晚了,但 WinPython 现在包含一个“零”版本,每个版本几乎都消除了所有臃肿。我相信安装的 WinPython-64bit v3.6.3.0Zero 版本的时钟大约为 50-100MB。