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