Installing and configuring PyXLL with Python 3.4+ or Anaconda

Canopy users who have purchased PyXLL can take advantage of the easy installation process provided by the Canopy-specific build of PyXLL. If you have purchased a PyXLL license but do not plan to use Canopy, you will need to download the package contents from our PyXLL page for the standalone installation. In addition to the installation / setup instructions found on the PyXLL site, please see the following tips for getting PyXLL working with non-Canopy Python environments.

PyXLL 3.0+:

As of PyXLL 3.0 you can now configure PyXLL to work a python installation by simply setting the following in pyxll.cfg:

[PYTHON]
executable = <your chosen python.exe here>

You'll also need to enter your license key into the "[LICENSE]" section of the same pyxll.cfg file, as described in the PyXLL documentation: "Configuration -- License Key".


PyXLL < 3.0:

Installation

For use with Anaconda:

Because the Anaconda environment is a "user" level (not system-wide) installation of Python, the embedded interpreter in Excel needs to have more information about the installation and can't guess a correct Python path. Unzip the PyXLL contents to the directory containing the Anaconda distribution, alongside your python.exe, and continue with the "Configuration" section below.

For use with standalone Python 3.4+:

After installing Python 3.4+ on your machine and setting it as the default (i.e., declaring it on your PATH environment variable), you will need to unzip the PyXLL files to the directory containing your Python installation (i.e., where your python.exe lives; e.g., C:\Python34). You will also need to install pywin32 using the official installer.

Configuration

If you have unzipped PyXLL next to the python.exe of your Python installation, you should customize your pyxll.cfg to add some directories to the pythonpath attribute of the configuration:

[PYXLL]
pythonpath =
    ./examples
./my_pyxll_addons

Once that is completed, you will have a fully functional Python environment under PyXLL, with support for win32com.

Note: Environments with multiple Python installations should be aware of potential issues. These are mostly related to the proper registration of COM objects by pywin32, as well as PyXLL's method for acquiring information about the Python runtime, both of which can be hard to configure properly when multiple Pythons exist on a single system. Regarding the latter point, having multiple Pythons can cause a problem if a Python not used by PyXLL has contributed something to the Windows registry (e.g., setting it as the default Python), as sys.path erroneously pulls in directories based on these registry keys and will interfere with the Python runtime being used by PyXLL.

You'll also need to enter your license key into the "[LICENSE]" section of the same pyxll.cfg file, as described in the PyXLL documentation: "Configuration -- License Key".

 

Have more questions? Submit a request

Comments

Powered by Zendesk