2012-03-26 53 views
2

我想安裝xlutils包來訪問Python中的xls表單,但不幸的是我無法安裝它。xlutil install -Python

Python版本3.1.1 =

我從網上下載這個tar文件位置 - http://pypi.python.org/pypi/xlutils到python31 /工具/腳本directory..This是我的setup.py位於..

然後試圖使用7Z文件解壓縮並從該目錄運行setup.py install命令。 並得到了following..Ran的

C:\Python31\Tools\Scripts>setup.py install 
running install 
running build 
running build_scripts 
running install_scripts 
running install_egg_info 
Removing C:\Python31\Lib\site-packages\UNKNOWN-0.0.0-py3.1.egg-info 
Writing C:\Python31\Lib\site-packages\UNKNOWN-0.0.0-py3.1.egg-info 

>>> import xlutils 
Traceback (most recent call last): 
    File "<pyshell#3>", line 1, in <module> 
    import xlutils 
ImportError: No module named xlutils 

我是否需要安裝xlutils之前安裝xlrd和xlwt?

請提供您的輸入

回答

0
  1. 你從錯誤的文件夾中運行setup.py - 你需要運行它,你到哪兒去解壓縮zip文件。

  2. 是的,這的確需要xlrd和xlwt - See here

  3. xlrd和xlwt不適用於Python 3中,但(I'm working on it for xlrd)。

0

今天我有同樣的問題。您可以嘗試以下步驟:

  1. 安裝xlrdxlwt;
  2. 安裝setuptools
  3. 安裝xlutils

祝你好運。