7

I have tried easy_install install openpyxl and python setup install. Both failed. I also tried easy_install openpyxl and failed again. I include the output I get.
When I try easy_install install openpyxl, I get the following output:

Searching for install
Reading https://pypi.python.org/simple/install/
Download error on https://pypi.python.org/simple/install/: timed out -- Some pac
kages may not be found!
Couldn't find index page for 'install' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: timed out -- Some packages ma
y not be found!
No local packages or download links found for install
error: Could not find suitable distribution for Requirement.parse('install')

When I try When I try easy_install openpyxl instead, I get the same output but with the word 'openpyxl' instead of 'install'.
When I try python setup install, I get the following output:

Traceback (most recent call last):
  File "setup.py", line 23, in <module>
    import openpyxl  # to fetch __version__ etc
  File "D:\Python\Excel\ericgazoni-openpyxl-22d4b2135553\openpyxl\__init__.py",
line 32, in <module>
    from openpyxl import workbook
  File "D:\Python\Excel\ericgazoni-openpyxl-22d4b2135553\openpyxl\workbook.py",
line 37, in <module>
    from openpyxl.writer.dump_worksheet import DumpWorksheet, save_dump
  File "D:\Python\Excel\ericgazoni-openpyxl-22d4b2135553\openpyxl\writer\__init_
_.py", line 29, in <module>
    from openpyxl.writer import excel
  File "D:\Python\Excel\ericgazoni-openpyxl-22d4b2135553\openpyxl\writer\excel.p
y", line 50, in <module>
    from openpyxl.writer.charts import ChartWriter
  File "D:\Python\Excel\ericgazoni-openpyxl-22d4b2135553\openpyxl\writer\charts.
py", line 27, in <module>
    from openpyxl.chart import Chart, ErrorBar
  File "D:\Python\Excel\ericgazoni-openpyxl-22d4b2135553\openpyxl\chart.py", lin
e 132, in <module>
    class Serie(object):
  File "D:\Python\Excel\ericgazoni-openpyxl-22d4b2135553\openpyxl\chart.py", lin
e 150, in Serie
    @color.setter
AttributeError: 'property' object has no attribute 'setter'

Any suggestions?

5 Answers 5

8

Just download it from here, extract it and copy the openpyxl-1.6.2\openpyxl folder into:

C:\Python27\Lib

That should do it (that directory should be added to your python path by default). That assumes default python installation directory. If you've got python installed elsewhere just put the openpyxl into the corresponding lib directory.

I was a fan of openpyxl but now, in the hindsight, I'd recommend driving Excel through the COM ports (so long as you've got the license for Excel).

10
  • It didn't work either. I tried copying openpyxl-1.6.2 (and all its contents) into C:\Python25\Lib and into C:\Python25\Lib\site-packages.
    – José
    Commented Aug 23, 2013 at 17:06
  • Note I need to use Python 2.5.
    – José
    Commented Aug 23, 2013 at 17:14
  • I will give driving Excell through the COM ports a try!
    – José
    Commented Aug 23, 2013 at 17:21
  • Good luck and enjoy :D It's pretty useful and works - there's still plenty of bugs in openpyxl (hence I had to look for alternatives, which was COM). Virtually all the commands I've come across so far are identical as in VBA so that's a useful resource. Just the syntax is a bit different but hey, you only have to read it not write it yourself :) Commented Aug 23, 2013 at 18:32
  • @José Don't copy the entire folder openpyxl-1.6.2 only openpyxl, which is inside, to the python lib. As for using python 2.5 perhaps it's time to upgrade? Why would you use an old version? I don't use 3.x (yet) either but the 2.7 is fine. Commented Aug 23, 2013 at 18:33
2

Version 1.7 is the last version that works with Python 2.5. The decision to drop support for Python 2.5 was largely because Python 2.5 itself is no longer supported by the Python Software Foundation.

1

In python3 The above mention methods are not working. Just download the openpyxl from their official web site and extract the zipped folder. And you may place that folder on your desktop. After that navigate to the openpyxl folder from the cmd. what you have to do is execute the command

python setup.py install

and everything works fine !!!

0

As Charlie Clark stated, you need to install an old version:

easy_install "openpyxl<=1.7.0"

or

pip install "openpyxl<=1.7.0"

the string is a requirement specifier.

-2

Just extract the folder you downloaded into C:\Python27\Lib and rename openpyxl-2.4.1 as openpyxl, then import the library as usual

1
  • 1
    this is exactly the same answer as the accepted answer. Commented Jan 26, 2017 at 20:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.