Using enpkg to update Canopy/EPD packages

(updated October 28, 2014)
   
You can use the enpkg utility to download, install, and update any packages that are licensed for your Canopy/EPD account. A Canopy/EPD Academic, Basic, or higher subscription covers all Canopy/EPD packages. A registered Enthought account (Canopy Express, EPD Free) covers updates only for the core scientific Python packages.
  

If you are using Canopy:

  • Be sure that your PATH is set to Canopy User Python, as described in this article, and not to Canopy's initially installed Python, which is for Canopy's internal use only.
    In Canopy 1.4 and above, the easiest way to do this is to open a Canopy Command Prompt / Terminal from the Canopy Tools menu.
  • At present, enpkg does not understand virtual environments, so will not be aware that the packages Qt, PySide and MKL were installed in Canopy Core and inherited by the Canopy User Python environment. Therefore one might be tempted to install them with enpkg. There is usually no need to do so (except to change versions.)
  • Also because enpkg is venv-blind, if you do an update of one of the originally installed packages (whether it was from the standard installer or large installer for disconnected machines), and you subsequently ask enpkg to revert to the originally installed version, then it won't be aware that the original version is available through Canopy Core, so will download its own copy of the same egg file and re-install from that.
From a terminal (e.g. cmd or bash) prompt, update the EPD installer and see an overview of the enpkg commands:
$ enpkg enstaller
$ enpkg --help 

Enter your email and EPD password. (You will be prompted for each of them after the following command):
$ enpkg --userpass
Display all available versions (and installation status, marked by asterisk) of all packages that match a case-insensitive string:
$ enpkg --search pand

Please note that packages marked "pypi" are part of our subscriber-only "PyPI" mirror repo of about 11000 "as-is" (untested and unsupported) community packages.

Update whatever packages you like, to the most recent versions in the online EPD repository:
$ enpkg ipython
$ enpkg pandas
$ enpkg matplotlib
$ enpkg scipy

Or for the most recent version of all already-installed packages (only from enpkg version 4.6 or higher):
$ enpkg --update-all

 

Display available updates of already-installed packages:
$ enpkg --whats-new

 

 Display the history (with versions) of all package installations and updates done with enpkg (or egginst) in this Python installation.

$ enpkg --log

 

Install an exact version-build of a particular package (especially useful for rollback):
$ enpkg numpy 1.6.1-5

 

Notes:

If you are protected by a proxy firewall, please see this article.  

If you are using EPD (not Canopy) on OSX, you should precede these commands by "sudo ".

Please do not enter support requests in article comments

Please use article comments for suggestions to improve the article. For individual support requests, please follow these guidelines.

Have more questions? Submit a request

Comments

  • Avatar
    Niko Heeren

    maybe this is obvious for most people, but I had to locate enpkg on my mac first. so in my case the was:

    sudo /Library/Frameworks/EPD64.framework/Versions/7.3/bin/enpkg enstaller

  • Avatar
    Niko Heeren

    some more info: I am using 10.8.2 and a limited user account. so in terminal I needed to login as admin first and locate the path.

  • Avatar
    Jonathan March

    Thanks for the feedback, Niko. Almost all individual EPD users have full admin access; the EPD installation includes the following lines in ~/.bash_profile:

    PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:${PATH}"

    export PATH

    or

    PATH="/Library/Frameworks/EPD64.framework/Versions/Current/bin:${PATH}"

    export PATH

    This means that the user normally does not need to be aware of the details of the EPD installation location.

    It sounds as if you installed EPD as an admin, so that admin user's PATH would have been set correctly, but you are running it as another user. It would probably be most convenient for you to make the above modification to your limited user account's ~/.bash_profile .

    FYI the next version of EPD, now in beta, will not require admin rights at all; it would always be installed from the account of the intended user.

  • Avatar
    Niko Heeren

    Hi Jonathan. Thank you for the nice hint and the info. You probably meant I should do the change in the administrator account ;)

    On my limited account the path is properly set, but I cannot sudo.