Skip to main content
 首页 » 编程设计

python之安装包的导入错误(wikitools)

2025年05月04日28me-sa

我已经使用 pip 安装了 wikitools,但是当我写的时候:

from wikitools import wiki, api 

在 Python 中,我收到以下消息:

Traceback (most recent call last): 
  File "<pyshell#1>", line 1, in <module> 
    from wikitools import wiki, api 
  File "C:\Python35\lib\site-packages\wikitools\__init__.py", line 19, in <module> 
    from wiki import * 
ImportError: No module named 'wiki' 

这里有什么问题?我正在使用 Python 3.5。

请您参考如下方法:

根据这个page , wikitools 与 Python 3 不兼容:

Requirements

  1. Python 2.5+. Not compatible with Python 3; not tested on older versions
  2. Bob Ippolito's simplejson module, if using Python < 2.6 http://pypi.python.org/pypi/simplejson
  3. To upload files or import XML, you need Chris AtLee's poster package http://pypi.python.org/pypi/poster
  4. The wiki this is used for should be running at least MediaWiki version 1.13 and have the API enabled.