我正在使用Python 2.5(并且需要保持这一点),并且已经下载了xlrd 0.8.0和xlwt 0.7.2,并且它们都似乎工作正常。Python - 我如何安装xlutils?
我将需要读取和写入Excel电子表格,所以我相信我还需要添加xlutils。问题是,我目前无法安装它。
我有点子,并试图简单:
pip install xlutils
跑和下载xlutils,却得到了挂了:
Downloading/unpacking xlutils
Downloading xlutils-1.6.0.tar.gz (54Kb): 54Kb downloaded
Running setup.py egg_info for package xlutils
Downloading/unpacking xlrd>=0.7.2 (from xlutils)
Downloading xlrd-0.9.2.tar.gz (167Kb): 167Kb downloaded
Running setup.py egg_info for package xlrd
Traceback (most recent call last):
File "<string>", line 14, in <module>
File "C:\Python25\Lib\site-packages\xlutils-1.6.0\build\xlrd\setup.py", li
ne 8, in <module>
raise Exception("This version of xlrd requires Python 2.6 or above. "
Exception: This version of xlrd requires Python 2.6 or above. For older versions of Python, you can use the 0.8 series.
... [snipping some]
----------------------------------------
Command python setup.py egg_info failed with error code 1 in C:\Python25\Lib\sit
e-packages\xlutils-1.6.0\build\xlrd
所以后来我想通这是试图下载一个新的xlrd (其中我不能在Python 2.5中使用),并且由于我已经安装了xlrd,所以它打破了这一点。
然后我试图刚刚从https://pypi.python.org/pypi/xlutils下载xlutils,然后用7zip的解压缩它,把xlutils文件夹下Python25>库>站点包,cd'd那里,做的:
python setup.py install
但这给了我这个错误在cmd窗口:
C:\Python25\Lib\site-packages\xlutils-1.6.0>python setup.py install
Traceback (most recent call last):
File "setup.py", line 5, in <module>
from setuptools import setup
ImportError: No module named setuptools
所以,我怎么能安装吗?
使用[virtualenv](http://www.virtualenv.org/en/latest/)并使用正规版本的python! – 2013-04-23 19:14:08