Package Manager

Canopy’s Package Manager makes it easy to discover and manage the Python packages available with your Canopy subscription. It provides a convenient way to:

  • find available packages and install them into your Canopy User Python or EPD environment
  • view, update, and remove installed packages

The Package Manager can be opened from the Canopy Welcome screen, or the Canopy Tools menu. Some Package Manager functionality depends on your subscription level. Currently the Package Manager only shows and manages packages installed from Enthought-format package repositories (either managed by Enthought or by your organization). Specifically, it does not know about packages installed from the command line with pip, setuptools, etc.

Note

Starting with version 2.0, Canopy uses a new EDM based backend for User Python environments instead of the older venv based environments. This was done to facilitate more robust environment and package management. This page documents Package Manager usage with the new EDM backend. If you are still using the older venv based user environment, then see the older Package Manager documentation here.

You can check the backend used by your Canopy installation by looking in the Settings Pane of the Package Manager.

Overview of Components

../_images/packman2-main-view-labeled.png

1. Navigator: (on the left) selects which component to display in the main pane (Installed packages, Available packages, Updates available, History, or Settings).

2. Main pane: displays whichever pane you select in the Navigator. Typically, it shows one of the three packages panes, with the package list at the top, and details about the selected package at the bottom.

3. Search bar: filters the list of packages to be shown in the package panes, by searching package names and summaries.

4. Login: displays the email address of the user currently logged in to Canopy. To log in with your Enthought credentials, go to the Canopy Welcome Screen. You must be logged to have access to all the packages available with your subscription.

5. Refresh: click to refresh the list of available packages and package versions. This is useful when a new package or version has been added to the package repositories, or your subscription level has been upgraded.

Package Panes - Installed, Available and Updates

../_images/packman2-package-action-running.png

These panes show three different sets of Python packages:

  • Installed: Shows all packages currently installed in your Canopy User Python or EPD environment.
  • Available: Shows all packages available to you in your currently active repositories, including packages already installed. To learn more about active and available repositories, please see “Settings Pane” (“Server” section), below.
  • Updates: Shows all packages that are already installed but for which a newer version is available to you in the active repositories. An “Update all” button is also provided as a convenience, to update all your installed packages to their latest available versions.

The number of packages in each of these package panes is shown in the Navigator.

Packages are marked with the following status indicators when appropriate:

orange_bang Orange bang: an update is available for this package.

green_checkbox Green check: this package is installed and up-to-date.

Package details

When you select a package, the package details section at the bottom of the pane shows details about that package. This includes a brief searchable summary, a longer description, the installed version (if applicable), and which versions are available in the store (package repositories). There are also action buttons to install / uninstall / upgrade the selected package. When you click on one of these buttons, that action is queued; it will be performed in the background as soon as possible; as this happens, the action’s detailed steps are shown in the History Pane.

As a convenience, a small information icon info_icon appears to the left of the action buttons while an action is being performed or queued; clicking this icon takes you directly to the relevant action log in the history pane.

The package details section also shows you which repository the package comes from (enthought/commercial in the above screenshot). It’s possible that you don’t have full access to this repository as part of your Canopy subscription. In this case, the install button changes to an orange “Subscribe to Install” button which prompts you to upgrade your subscription from the Enthought website. (You might also see this if you are a subscriber but have not yet logged in on the Canopy Welcome screen.)

If you only have read access to the Python environment (for example if your Python installation is completely managed by IT), then you cannot install or remove packages, so no action buttons will be shown. See the “Python Environment” section in Settings Pane.

History Pane

../_images/packman2-history-single.png

The history pane shows a list of package actions, with the newest first. Each line represents the requested installation or removal of one package. An installation action automatically includes the installation of dependent packages, and the preliminary removal of other versions (usually older) of any of these packages.

By default, the history pane lists revisions from all sessions of Package Manager. Revisions from previous sessions are listed in gray, and their detail sections show a synopsis of the revision. You can disable showing revisions from previous sessions in the Settings Pane.

Selecting an item from the history list shows details of that item in the bottom pane. For an action which is in progress, this shows a log which is updated in real time as the steps are performed. For a completed action, a synopsis is also included, summarizing which packages were installed, removed and updated. Usually, most of the packages listed in the log or summary will be the dependencies of the requested package.

When you begin to install/uninstall a package, a line for that action, with status “In-progress” is added to the top of the history list. When the action completes, the status changes to “Done”, with a revision number marking the current state of your Python environment.

Queuing and Canceling package actions

../_images/packman2-history-multiple.png

Package actions are executed sequentially. When a package action is executing, you can see a rotating circle of arrows next to “History” in the Navigator. If you add an action while others are still running, it is added to the top of the history list as “Waiting”.

You can cancel any waiting action by clicking on the small “x” to the right of the word “Waiting”. You can also click the red button “Cancel all waiting actions”. However you cannot cancel actions that are in progress, because that could break package dependencies in the Python environment. For the same reason, you cannot close the Package Manager window while actions are in progress.

Copy package history to clipboard

copy_history If you are communicating with the Enthought support team about problems in your Python environment, “Copy history to clipboard” can be a useful diagnostic aid. This small green button is located in the Navigator, to the right of the word “History”. When clicked, it copies the history of package actions to your clipboard. You can paste this history into a support email or ticket.

Settings Pane

../_images/packman2-settings.png

In the settings pane, you can view your active and available repositories, repository server URL, Package Manager version information, etc. Some of these settings can be changed; others are just informative.

Appearance

“History” specifies whether to show revisions from previous Package Manager sessions as well as from the current session. Display of previous sessions can be temporarily disabled (for the duration of the current session).

Server

“Server URL” shows where the package repositories are located. Normally the server is provided by Enthought, although for licensees of the Enthought Deployment Server product, this would be on your own server.

“Repositories” shows which package repositories are active, followed by a dropdown list of inactive available repositories. The level of your Canopy subscription provides you with access to specific package repositories. You can select which of these you want to be “active”, i.e. where you can immediately search for packages to install or update. By default, only the enthought/free and enthought/commercial repositories are active, and the enthought/gpl repository may optionally be activated (as well as the enthought/ets repository, and the deprecated, unmaintained enthought/pypi repository).

Note that depending on your type of subscription, you might not have full access to all your active repositories. For example, free Express users can activate and see all the packages in the enthought/commercial and enthought/gpl repositories, but cannot install these packages without subscribing.

You can activate an available repository by selecting it from the inactive available repository drop-down list, and clicking “Add”. To inactivate an active repository, click on the “x” button next to its name. Your selection of active repositories will persist into future Package Manager sessions.

Each active repository is marked with one of the following status icons:

green_checkbox Green check: You have full access to view and install packages in this repository.

orange_bang Orange bang: You can view the packages available in this repository but not install them. Installing these packages requires you to upgrade your subscription.

red_warning Red warning: You have no access to this repository. This might be shown if another user on your system activated the repository when they were logged in, but your subscription does not have access to it, or if it does not actually exist.

Python Environment

Shows information about the Python environment (a.k.a. runtime) which the Package Manager is managing.

The prefix label displays the full path to either your Canopy User Python environment or to your EPD installation. If you only have read access to the Python environment (for example if your Python installation is completely managed by IT), then a red warning icon will show, with accompanying text. In this case, you can not install or remove packages, only view the various package lists.

The backend label displays the backend currently in use by the Package Manager to manage packages in the User Python Environment. The backend is edm for new User Python environments created in Canopy 2.0.0 or later, which are managed by EDM, and enpkg for User Python environments managed by enstaller as installed by previous Canopy releases or by EPD.

About

Shows version information for the Package Manager and some of its key dependencies. This information may be useful if you have a problem with the Package Manager and want to provide full context to the Enthought support team.

Managing packages from the command line using EDM

Note

This section is for advanced users. Whenever possible, packages should be installed using Canopy’s GUI Package Manager.

Starting from Canopy 2.0.0 the Package Manager uses EDM as the backend to manage packages. It is also possible to manage packages in the User Python Environment from the command line using EDM directly.

With your User Environment activated the edm executable should be available in your PATH and accessible directly in your terminal.

To install packages use the install command. E.g. to install ipython:

$ edm install ipython

You can list the installed packages in your environment with the list command:

$ edm list

See the EDM Documentation for more information on using EDM.