PyXLL requires 32-bit Python on most systems

Summary: Even on 64-bit versions of Windows, 32-bit Excel is the norm (explanation); in order to use PyXLL with 32-bit Excel, you must use the 32-bit version of Python. Do not assume that your Excel is 64-bit!

If you use non-matching (32-bit vs 64-bit) Excel and Python, then when you open Excel, you are likely to see a sheet full of apparently random characters.

To check whether your installation of Excel is 32-bit or 64-bit, simply evaluate the Excel function @info("osversion"), whose output will begin with "Windows (32-bit)" or "Windows (64-bit)". Note that the "32" or "64" actually refers not to the Windows version, but to the Excel version, which is the significant information for the purpose of choosing your Python/PyXLL version.

PyXLL is offered in both 32-bit and 64-bit builds, giving users of 64-bit Python access to PyXLL's integration tools. However to use 64-bit PyXLL / Python, you must also have a 64-bit version of Microsoft Office. Due to the fact that many MS Office add-ins are still 32-bit, most users will still have the 32-bit version of Excel installed and, therefore, cannot leverage the 64-bit builds of Python / PyXLL.

Many users will not notice a difference between 32-bit and 64-bit versions of Python. The main difference would be if you need to use very large datasets that require the ability to address more than the 4 Gb of RAM, which is the limit of 32-bit Python.

If this is an issue, then note that on a 64-bit system, you can install 64-bit Canopy (version 2 or above) including 64-bit Python, then add a 32-bit Python environment to use with 32-bit Excel. The downside is that you then would need to maintain both environments. For more information, see "Installing a new Canopy version" and "Canopy 2.1: Managing and switching between Python 2.7 and 3.5 environments".

Pro Tip: The reason for this PyXLL restriction is that in general, it is not possible to load a 64-bit .dll into a 32-bit process or vice versa. This is how PyXLL exposes Python to Excel.

Have more questions? Submit a request


Powered by Zendesk