windows系统python安装openpyxl,在Windows的python2.5上安装Openpyxl

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

import openpyxl # to fetch __version__ etc

File "D:\Python\Excel\ericgazoni-openpyxl-22d4b2135553\openpyxl\__init__.py",

line 32, in

from openpyxl import workbook

File "D:\Python\Excel\ericgazoni-openpyxl-22d4b2135553\openpyxl\workbook.py",

line 37, in

from openpyxl.writer.dump_worksheet import DumpWorksheet, save_dump

File "D:\Python\Excel\ericgazoni-openpyxl-22d4b2135553\openpyxl\writer\__init_

_.py", line 29, in

from openpyxl.writer import excel

File "D:\Python\Excel\ericgazoni-openpyxl-22d4b2135553\openpyxl\writer\excel.p

y", line 50, in

from openpyxl.writer.charts import ChartWriter

File "D:\Python\Excel\ericgazoni-openpyxl-22d4b2135553\openpyxl\writer\charts.

py", line 27, in

from openpyxl.chart import Chart, ErrorBar

File "D:\Python\Excel\ericgazoni-openpyxl-22d4b2135553\openpyxl\chart.py", lin

e 132, in

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?

解决方案

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个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值