0

I've already installed mechanize using pip install mechanize, such that when I enter it in the command prompt, the response is: Requirement already satisfied: mechanize in c:\users\wwl\anaconda3\lib\site-packages.

However, when I type import mechanize in the jupyter notebook, it gives an error:

ImportError: No module named '_mechanize'.

Where have I gone wrong?

wwl
  • 2,025
  • 2
  • 30
  • 51

1 Answers1

1

Are you using Virtualenv?

If so, make sure you are importing the global libraries to your virtualenv (https://virtualenv.pypa.io/en/stable/userguide/#removing-an-environment).

If not, probably your Python version is not compatible. https://stackoverflow.com/a/24001585/2051397

Hope it helps

Community
  • 1
  • 1
Franklin
  • 881
  • 1
  • 8
  • 28