xlrd and xlwt installer for Windows (64-bit)

13,617 views
Skip to first unread message

MF

unread,
Dec 7, 2010, 9:42:10 AM12/7/10
to python-excel
Hi,

Is there xlrd and xlwt installer for 64-bit windows.

I want to use these module on 64-bit windows but can not find any
download of these module for 64-bit windows.

Does anyone know how to compile source code or create installer (xlrd
and xlwt) for 64-bit windows?

greetins,
Farhan.

John Machin

unread,
Dec 7, 2010, 3:48:45 PM12/7/10
to python...@googlegroups.com

Hi Farhan,

xlrd and xlwt are pure-Python packages (no C-extensions included) so they
can be installed from the .zip file just about anywhere.

1. Set up a directory called C:\installers (or some other name of your
choice).

2. Download xlrd-0.7.1.zip from PyPI into that directory.

3. Unzip it so that you get C:\installers\xlrd-0.7.1\etc etc

4. Start up a Command Prompt window, and then do:

prompt> cd C:\installers\xlrd-0.7.1
prompt> c:\Python27\python setup.py install

The last line above assumes that you are using Python 2.7 and have
installed it in the default location ... if not, adjust accordingly.

I'm doing some research on how to provide an installer (a .msi file,
probably that will work on 64-bit Windows; in the meantime, the above
should get you going.

Cheers,
John

Chris Withers

unread,
Dec 7, 2010, 6:54:16 PM12/7/10
to python...@googlegroups.com
On 07/12/2010 20:48, John Machin wrote:
> 1. Set up a directory called C:\installers (or some other name of your
> choice).
>
> 2. Download xlrd-0.7.1.zip from PyPI into that directory.
>
> 3. Unzip it so that you get C:\installers\xlrd-0.7.1\etc etc
>
> 4. Start up a Command Prompt window, and then do:
>
> prompt> cd C:\installers\xlrd-0.7.1
> prompt> c:\Python27\python setup.py install

easy_install xlrd
easy_install xlwt

...will also "just work", assuming you have installed easy_install ;-)

Chris

--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk

MF

unread,
Dec 8, 2010, 4:58:34 AM12/8/10
to python-excel
Hi John,

Thanks for your quick reply. I tried your solution, it works fine for
python 2.7 but when i tried it with python 3.1 (which i am currently
using), i get the following

errors. Can you please tell me what i have done wrong?

C:\installer\xlrd-0.7.1>python setup.py install
running install
running build
running build_py
running build_scripts
creating build\scripts-3.1
copying scripts\runxlrd.py -> build\scripts-3.1
running install_lib
creating C:\Python31\Lib\site-packages\xlrd
copying build\lib\xlrd\biffh.py -> C:\Python31\Lib\site-packages\xlrd
copying build\lib\xlrd\compdoc.py -> C:\Python31\Lib\site-packages
\xlrd
creating C:\Python31\Lib\site-packages\xlrd\doc
copying build\lib\xlrd\doc\compdoc.html -> C:\Python31\Lib\site-
packages\xlrd\do
c
copying build\lib\xlrd\doc\xlrd.html -> C:\Python31\Lib\site-packages
\xlrd\doc
creating C:\Python31\Lib\site-packages\xlrd\examples
copying build\lib\xlrd\examples\namesdemo.xls -> C:\Python31\Lib\site-
packages\x
lrd\examples
copying build\lib\xlrd\examples\xlrdnameAPIdemo.py -> C:\Python31\Lib
\site-packa
ges\xlrd\examples
copying build\lib\xlrd\formatting.py -> C:\Python31\Lib\site-packages
\xlrd
copying build\lib\xlrd\formula.py -> C:\Python31\Lib\site-packages
\xlrd
copying build\lib\xlrd\licences.py -> C:\Python31\Lib\site-packages
\xlrd
copying build\lib\xlrd\sheet.py -> C:\Python31\Lib\site-packages\xlrd
copying build\lib\xlrd\timemachine.py -> C:\Python31\Lib\site-packages
\xlrd
copying build\lib\xlrd\xldate.py -> C:\Python31\Lib\site-packages\xlrd
copying build\lib\xlrd\__init__.py -> C:\Python31\Lib\site-packages
\xlrd
byte-compiling C:\Python31\Lib\site-packages\xlrd\biffh.py to
biffh.pyc
File "C:\Python31\Lib\site-packages\xlrd\biffh.py", line 264
return u""
^
SyntaxError: invalid syntax

byte-compiling C:\Python31\Lib\site-packages\xlrd\compdoc.py to
compdoc.pyc
File "C:\Python31\Lib\site-packages\xlrd\compdoc.py", line 51
self.name = u''
^
SyntaxError: invalid syntax

byte-compiling C:\Python31\Lib\site-packages\xlrd\examples
\xlrdnameAPIdemo.py to
xlrdnameAPIdemo.pyc
byte-compiling C:\Python31\Lib\site-packages\xlrd\formatting.py to
formatting.py
c
File "C:\Python31\Lib\site-packages\xlrd\formatting.py", line 168
print "nearest_colour_index for %r is %r -> %r; best_metric is %d"
\
^
SyntaxError: invalid syntax

byte-compiling C:\Python31\Lib\site-packages\xlrd\formula.py to
formula.pyc
File "C:\Python31\Lib\site-packages\xlrd\formula.py", line 410
print "!!! get_externsheet_local_range: refx=%d, not in range(%d)"
\
^
SyntaxError: invalid syntax

byte-compiling C:\Python31\Lib\site-packages\xlrd\licences.py to
licences.pyc
byte-compiling C:\Python31\Lib\site-packages\xlrd\sheet.py to
sheet.pyc
File "C:\Python31\Lib\site-packages\xlrd\sheet.py", line 767
self.put_cell(rowx, colx, XL_CELL_TEXT, u"", xf_index)
^
SyntaxError: invalid syntax

byte-compiling C:\Python31\Lib\site-packages\xlrd\timemachine.py to
timemachine.
pyc
File "C:\Python31\Lib\site-packages\xlrd\timemachine.py", line 28
False = 0
SyntaxError: assignment to keyword

byte-compiling C:\Python31\Lib\site-packages\xlrd\xldate.py to
xldate.pyc
File "C:\Python31\Lib\site-packages\xlrd\xldate.py", line 116
def xldate_from_date_tuple((year, month, day), datemode):
^
SyntaxError: invalid syntax

byte-compiling C:\Python31\Lib\site-packages\xlrd\__init__.py to
__init__.pyc
File "C:\Python31\Lib\site-packages\xlrd\__init__.py", line 345
u"Consolidate_Area": u"\x00",
^
SyntaxError: invalid syntax

running install_scripts
copying build\scripts-3.1\runxlrd.py -> C:\Python31\Scripts
running install_egg_info
Writing C:\Python31\Lib\site-packages\xlrd-0.7.1-py3.1.egg-info

John Machin

unread,
Dec 8, 2010, 5:24:50 AM12/8/10
to python...@googlegroups.com
On Wed, December 8, 2010 8:58 pm, MF wrote:
> Hi John,
>
> Thanks for your quick reply. I tried your solution, it works fine for
> python 2.7 but when i tried it with python 3.1 (which i am currently
> using), i get the following
>
> errors.

Neither xlrd nor xlwt can be run on Python 3.X yet. This is likely to
change within the next couple of months.

Cheers,
John


Reply all
Reply to author
Forward
0 new messages