問(wèn)題描述
我想將 Python 部署給我組織中的非程序員,以便安裝過(guò)程完全包括從 Perforce 同步一個(gè)目錄,并且可能運(yùn)行一個(gè)設(shè)置環(huán)境變量的批處理文件.
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 打包成只需復(fù)制一個(gè)目錄就可以安裝"?它的安裝程序是做什么的?
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?
這樣做的原因是,我想通過(guò)為我們的藝術(shù)家提供可以從命令行運(yùn)行的 Python 腳本來(lái)自動(dòng)執(zhí)行某些任務(wù).但是我需要將解釋器安裝到他們的機(jī)器上,而不必運(yùn)行任何類(lèi)型的安裝程序或卸載程序,或者任何可能以非冪等方式失敗的進(jìn)程.設(shè)置環(huán)境變量的批處理文件很好,因?yàn)樗莾绲鹊?可能中途失敗并將工作站置于需要干預(yù)修復(fù)的狀態(tài)的安裝程序不是.
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.
特別是,為每個(gè)人的安裝添加一個(gè)庫(kù)應(yīng)該包括我在我的辦公桌上使用 conda
,將隨后的目錄檢查到 P4,然后讓藝術(shù)家使用他們的下一個(gè) 自動(dòng)拾取它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.
我們是一家專(zhuān)門(mén)的 Windows 商店,因此不需要 Linux 或 Mac 便攜式解決方案.
We are exclusively a Windows shop, so do not need Linux- or Mac-portable solutions.
推薦答案
您可以使用 靜默安裝模式 創(chuàng)建一個(gè)完全可移植的 Miniconda 安裝(250MB 對(duì)于 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)
這篇關(guān)于可以打包 Anaconda 以進(jìn)行便攜式零配置安裝嗎?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!