問題描述
我想將 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)
這篇關于可以打包 Anaconda 以進行便攜式零配置安裝嗎?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!