The Canopy Command Line interface (CLI) includes powerful features for system administrators to create multi-user and automated Canopy installations.
This article describes the most frequent use of the CLI -- the "Managed Common Install", for sharing an installation efficiently among multiple users. The Managed Common Install is also an easy way to specify that Canopy and your Canopy Python environments will not be installed in your home directory.
The Managed Common Install provides all users with the same Python environment, managed by system administration. This is well suited to production environments, classrooms, and other institutions that wish to ensure a uniform set of packages for all users.
The key advantages of a Managed Common Install, in contrast to a default shared installation with multiple users, are:
- Updating library packages is done by the central administrator on behalf of all users (rather than by each individual user). This is particularly useful when the users are not skilled Python developers or when you want all users to use the same package versions.
- System administrators can update the Canopy package set without assessing whether it is necessary to clean out the environments of individual users.
- System administrators can update the Canopy GUI application without being superseded by individual users.
- Canopy's footprint in the home directories of individual users is very light (just configuration, preference, log, and macro script files, typically occupying less than 1 MB, mostly log files). This is because the Python environments which Canopy creates for each user are nonexistent for a Managed Common Install; compare this to hundreds or thousands of MB per user with a default multi-user installation. This is particularly useful when there are constraints on the size of user home directories (roaming profiles or limited disk storage).
Limitations of a Managed Common Install
In a Managed Common Install, non-admin users will not be able to modify anything within Canopy's Python environments because they are located in the "Program Files" directory. Therefore the following features of Canopy will behave differently for non-admin users:
- Non-admin users are not able to install, update, or remove packages (whether through the Canopy Package Manager or at the command line).
- Non-admin users cannot use the Preferences => Python => Environments options to create, modify, or delete Canopy Python environments. Non-admin users are able to switch between admin-defined environments.
Managed Common Install Environments
A standard Managed Common Install has a User environment and optionally additional Canopy Python environments, both Python 2.7 and 3.5, just as in a default individual Canopy installation. The difference is that these environments are managed by system admin, and are available for direct use, but not modification, by individual users.
As an additional option, a Managed Common Install can be configured so that the Canopy User environment is replaced by a stand-alone Python environment installed separately by a stand-alone installation of the Enthought Deployment Manager (EDM). This configuration completely separates the maintenance of the user's Python & packages, from maintenance of the Canopy GUI application, while still allowing user scripts to run on the stand-alone Python environment, from within the Canopy GUI.
Open Common Install not supported in Canopy 2
Canopy 2 does not support the previously allowed "open common install" option which permitted users to update or install their own packages on top of a managed base installation.
The Managed Common install is created using the Canopy CLI's "post-install-setup" command, described in "Canopy 2 CLI post-install-setup options".
Step-by-step procedures for the most frequently encountered scenarios:
"Installing Canopy 2 on Windows for classroom/lab use"
"Installing Canopy 2 on Linux for classroom lab use"
Updating the environments and packages in a Managed Common Install
1) The admin must have full file system read-write access to the Managed Common Install to update the Python environments. On Windows, this typically means that you must "Run [Canopy] as administrator". On Mac or Linux, it may mean that you must start Canopy with sudo.
2) A Canopy Managed Common Install also sets a software lock on its Python environments so that users with admin rights will not accidentally or arbitrarily make changes to an environment while others are using it. For details of how to unlock / relock the environments, see sub-section "Manage shared environments" in "Scenario: Canopy Managed Common Install".
(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".