Python, cant use mechanize - No module named 'mechanize'

85 Views Asked by At

hope u can help me.

i have the problem that i cant use mechanize in Python. i really dont know why.

My python version is: Python 3.10.9

i just wrote this in a python file:

import mechanize

browser = mechanize.Browser()

and the Error is:

Traceback (most recent call last): File "C:\Users\Daniel\Desktop\stackoverflow.py", line 1, in import mechanize ModuleNotFoundError: No module named 'mechanize'

thanks guys!

before you ask, yes i installed the last version of mechanize on my windows computer like this:

C:\Users\Daniel>pip3 install mechanize
Requirement already satisfied: mechanize in c:\users\daniel\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (0.4.8)
Requirement already satisfied: html5lib>=0.999999999 in c:\users\daniel\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from mechanize) (1.1)
Requirement already satisfied: webencodings in c:\users\daniel\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from html5lib>=0.999999999->mechanize) (0.5.1)
Requirement already satisfied: six>=1.9 in c:\users\daniel\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from html5lib>=0.999999999->mechanize) (1.16.0)
0

There are 0 best solutions below