First of all, you do not need xlutils just to read and write Excel files. You can read them with xlrd and write them with xlwt and provide your own "glue" in the Python code that you write yourself.
That said, xlutils does provide features that make some things more convenient than writing them for yourself (that is the point of its existence). So the second part of my answer is: You do not need to "install" xlutils per se. You can just unpack it and put the xlutils directory into site-packages and be off and running. This is true for pretty much every pure-Python package, as far as I know. (Some other packages are partially written in C (or sometimes other languages) and these often require specific installation steps.) So why do pure-Python packages provide a setup.py script? Usually to run tests or to build .pyc files, both of which are optional.
First of all, you do not need xlutils just to read and write Excel files. You can read them with xlrd and write them with xlwt and provide your own "glue" in the Python code that you write yourself.
That said, xlutils does provide features that make some things more convenient than writing them for yourself (that is the point of its existence). So the second part of my answer is: You do not need to "install" xlutils per se. You can just unpack it and put the xlutils directory into site-packages and be off and running. This is true for pretty much every pure-Python package, as far as I know. (Some other packages are partially written in C (or sometimes other languages) and these often require specific installation steps.) So why do pure-Python packages provide a setup.py script? Usually to run tests or to build .pyc files, both of which are optional.
xlutils 1.4.1 is compatible with python 2.5. So this should work:
pip install xlutils==1.4.1
You can install from pypi using pip:
pip install --user xlutils
http://pythonhosted.org/xlutils/installation.html
If pip.exe is not in your PATH use the full path to to pip.exe or replace pip with python -m pip
@Luke's answer filled the key steps to a solution.
A few extra things that I had to do to my vanilla ArcGIS install of ArcPy were:
- Added
;C:\Python27\ArcGIS10.4to myPathso thatpythonwas recognized as a command - Used
python -m pip install --user xlutilswhich I ran inC:\users\PolyGeo - When the
xlutilssite-package still did not import I went toC:\Users\PolyGeo\AppData\Roaming\Python\Python27\site-packagesand cut two foldersxlutilsandxlutils-2.0.0.dist-info - I then pasted those two folders into
C:\Python27\ArcGIS10.4\Lib\site-packages
I was then able to import xlutils.
As commented by @Luke the steps above may not have been necessary:
You should never need to cut and paste pip installed packages/modules. I use the
--userflag as I don't have admin rights to install directly to the python installation directory, but you can leave that out to install directly toC:\Python27\ArcGIS10.4. Also, the user site packages directoryC:\users\username\python27only gets added to your python path if it exists when python starts. So you would need to restart IDLE to get python to register the newly installed module. You would only need to do this once, i.e the first time you ever install using the--userflag.