I think i don't have parse library. So, Where can i get it?
As beginner, I need your help.
I wrote from lxml.html import parse , Computer say name 'parse' is not defined
I think i don't have parse library. So, Where can i get it?
As beginner, I need your help.
I wrote from lxml.html import parse , Computer say name 'parse' is not defined
You actually probably need the lxml
package, which was in the comment by cel. It seems to me like your question is concerning how to actually install the package. Everything at PyPi (the Python package index) can be installed in several ways. For me, the easiest is using pip
, which is a tool for installing Python packages. Here are some links for how to get pip on your machine for different operating systems: Windows, Mac OSX, or in general.
Once you have pip
installed, you go to your command line and type
pip install ['package_name']
where, in your case, package_name
would be lxml
. Once you do that, your import should work just fine. The full pip documentation is here.
If you prefer to manually install the package, you can download the source and install it according to the Python docs for Python 2.x or 3.x.