Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing mechanize for python 3.4

Tags:

I'm trying to retrieve the mechanize module for python 3.4. Can anybody guide me in the right direction and perhaps walk me through the steps that I would need to take in order to make the correct installation? I'm currently using Windows 10.

like image 541
Carnageta Avatar asked Aug 02 '15 17:08

Carnageta


People also ask

How do I install mechanize in Python 3?

Installation. To install for development: git clone https://github.com/python-mechanize/mechanize.git cd mechanize pip3 install -e . To install manually, simply add the mechanize sub-directory somewhere on your PYTHONPATH .

Does mechanize work with Python 3?

unfortunately mechanize only works with Python 2.4, Python 2.5, Python 2.6, and Python 2.7.

What is mechanize in Python?

The mechanize module in Python is similar to perl WWW:Mechanize. It gives you a browser like object to interact with web pages. Here is an example on how to use it in a program.


2 Answers

unfortunately mechanize only works with Python 2.4, Python 2.5, Python 2.6, and Python 2.7.

The good news is there are other projects you can take a look at: RoboBrowser, MechanicalSoup

There are more alternatives in this thread as well: Are there any alternatives to Mechanize in Python?.

like image 63
Jean Guzman Avatar answered Oct 31 '22 14:10

Jean Guzman


(edit) Mechanize 0.4.0 was release a few days ago (16th Jan 2019) and includes the python3 fixes from the mechanize3 fork so you could consider just updating to the latest mechanize release.

pip install -U mechanize 
like image 27
tgates42 Avatar answered Oct 31 '22 13:10

tgates42