Installing and configuring PyXLL with Enthought Canopy

By far the easiest way for a Canopy subscriber (commercial or academic) to install PyXLL (either purchased or 30-day trial) is from the Canopy Package Manager or with the "edm" command line utility ("enpkg" in Canopy V1). This custom build of PyXLL handles most of the details of configuring PyXLL to work with both Excel and Canopy User Python.

Please note that for fundamental technical reasons, PyXLL is only available for Excel on Windows. For Mac or Linux users who wish to take advantage of PyXLL, you can use it (as many of us at Enthought do), in a Windows Virtual Machine such as Fusion. Your single PyXLL and Canopy licenses are good on as many physical and virtual machines as you individually use. 

To install PyXLL for use with Canopy Python, please follow these steps:

  1. Launch the Package Manager from the Canopy Welcome Screen.
     
  2. Select “Available Packages” and search for “pyxll”. Select the “pyxll” package from the list and click the “Install” button to the right to have Canopy download and install PyXLL for you.
     
  3. Next (steps 3-5), you will edit the pyxll.cfg config file to configure PyXLL on your machine.
    Start by launching the “Canopy Command Prompt” from the Canopy Tools menu.
     
  4. At the Windows command prompt type:
    edit_pyxll_configuration

    This will launch Canopy and open the pyxll.cfg configuration file for editing.
     
  5. Here are the edits that you should make to this configuration file.
    (For detailed discussion of the format of this file, see this article in the PyXLL documentation: https://www.pyxll.com/docs/index.html#config-file.)
     
    • In the "[PYXLL]" section of the configuration file, set "pythonpath" to specify one or more directories where where you will put your Python modules to define Excel-callable functions.
    • Set "modules" to the name of the Python module where your first functions will be defined. You can add more module names later.
    • In the "[log]" section, set  path and file to where you want log files to be written. (By default, they will be written to the "logs" subdirectory of the pyxll installation directory.)
    • If you have a license key, copy it to the license section as described in the documentation. If you do not have a license key, your PyXLL trial is good for 30 days.

Note: For sharing spreadsheets, anyone using a spreadsheet that uses PyXLL functionality will need to have a working installation of Canopy (Python) & PyXLL, along with all custom Python source code used by the PyXLL module. Otherwise, the user may be able to open the spreadsheet to a static view of the last saved state of the spreadsheet, but will generate errors if any cells are refreshed (either manually or automatically by the spreadsheet/PyXLL).

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
    Jonathan March

    Updated article to reflect the fact that PyXLL is now usable for a 30-day trial after installation.

Powered by Zendesk