我正在使用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