我已经使用pip install mechanize安装了mechanize,所以当我在命令提示符下输入它时,响应是:Requirement already satisfied: mechanize in c:\users\wwl\anaconda3\lib\site-packages。
但是,当我在jupyter笔记本中输入import mechanize时,它给出一个错误:
ImportError: No module named '_mechanize'。
我哪里错了?
发布于 2017-02-23 04:52:49
你在使用Virtualenv吗?
如果是,请确保将全局库导入到您的virtualenv (https://virtualenv.pypa.io/en/stable/userguide/#removing-an-environment)。
如果不兼容,则可能是您的Python版本不兼容。https://stackoverflow.com/a/24001585/2051397
希望能有所帮助
https://stackoverflow.com/questions/42401866
复制相似问题