Canopy 2 CLI post-install-setup options

The Canopy Command-Line Interface (CLI) provides options for scripting Canopy setup immediately after installation, with a new canopy_cli post-install-setup subcommand. These options can also be specified directly to the Windows MSI installer, for single-command installation and setup on Windows.

Here is the usage syntax of this new subcommand, followed by a description of its optional arguments:

$ canopy_cli post-install-setup --help
usage: canopy_cli post-install-setup [-h]
        [--managed-common-install MANAGED_COMMON_INSTALL_PATH]
        [--user-python USER_PYTHON_PATH]
        [--license-path LICENSE_PATH]

When installing from a Windows MSI, the same functionality is available; the MSI command-line arguments are spelled a little differently (note that the quotation marks are required):


Detailed description of each sub-option:

--managed-common-install [msi: SETUP_MANAGED_COMMON_INSTALL]: This option creates shared System and User virtual environments which will be used by all users, so that per-user environment directories will not be created. The argument is the path to a directory, which will be created if necessary, along with a Canopy (for Windows-64), or Canopy_64bit, or Canopy_32bit subdirectory, below which these shared System and User environments will be created.

--user-python [msi: SETUP_USER_PYTHON]: This option sets a pre-existing python environment as the default python environment for this Canopy installation. No User Python environment is created. The argument is the path to an existing python executable (pythonw.exe in Windows, python in Mac or Linux). If Canopy subsequently fails to start, with an error message about the kernel interpreter, then you've probably specified this option incorrectly.

--license-path [msi: SETUP_LICENSE_PATH]: This option copies existing canopy license files into the Canopy installation directory, and sets global Canopy preferences to use these license files, in conjunction with user login, to determine user privileges. The argument is a list of absolute paths (license files or directories, separated by semicolons in Windows or colons in Mac or Linux). The contents of these files or directories (including subdirectories recursively) are copied into the Canopy installation directory.



Example of usage in Windows (including specifying a log file for audit and debugging):

msiexec /lv*x msi.log /i canopy-1.7.4*.msi SETUP_MANAGED_COMMON_INSTALL="C:\Program Files\Enthought" SETUP_LICENSE_PATH="C:\Users\xx\Canopy-licenses"

Warning: Because of Windows idiosyncrasies, it's essential that you not put a closing backslash character at the end of any of the paths which you pass to msiexec.


Two common scenarios are described in detail in these Knowledge Base articles:

Installing Canopy 2 on Windows for classroom/lab use


Please do not enter support requests in article comments

Please use article comments for suggestions to improve the article. See "How to submit Enthought Canopy/EPD support requests".

Have more questions? Submit a request


Powered by Zendesk