Python mechanize module not found

夙愿已清 提交于 2019-12-04 19:18:54

Try this in case pip or easy_install, for whatever reason, aren't working:

Download the source code from http://pypi.python.org/packages/source/m/mechanize/mechanize-0.2.5.tar.gz

Unzip the package, go to the command line, change into the folder that was extracted and type:

python setup.py install

If you're on Linux/Mac, you may need to type the following:

sudo python setup.py install

Would like to add something for some future users:

In case some of the users get the error "No module named '_version'" Mechanize however doesn't support Python 3 so you should install a Python 2.x release (the latest available is 2.7.3), install the mechanize package there and then retry running your script.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!