Forums

mechanize

Hello,

If i run:

import mechanize

I get:

File "/usr/local/lib/python3.5/dist-packages/mechanize/init.py", line 122, in <module> from _mechanize import \ ImportError: No module named '_mechanize'

if i install it in my bash console ($ pip3.6 install mechanize) I get:

Requirement already satisfied: mechanize in /usr/local/lib/python3.6/dist-packages

Any help on this?

thanks in advance

looks like you're working off two different versions of python there? 3.5 and 3.6?

I know this post is old but I am having this same problem (same Python version though, 3.6).

File "/usr/local/lib/python3.6/dist-packages/mechanize/init.py", line 122, in <module> from _mechanize import \ ModuleNotFoundError: No module named '_mechanize'

(master)$ pip3.6 install mechanize Requirement already satisfied: mechanize in /usr/local/lib/python3.6/dist-packages

I have no problems with mechanize locally with python3.

This fixed it - never mind. pip3.6 install --user --upgrade mechanize