Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #80088 > unrolled thread
| Started by | Simon Evans <musicalhacksaw@yahoo.co.uk> |
|---|---|
| First post | 2014-11-01 07:17 -0700 |
| Last post | 2014-11-03 21:42 +0000 |
| Articles | 20 — 5 participants |
Back to article view | Back to comp.lang.python
Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-11-01 07:17 -0700
Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Terry Reedy <tjreedy@udel.edu> - 2014-11-01 16:43 -0400
Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-11-02 06:58 -0800
Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-11-02 15:27 +0000
Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Terry Reedy <tjreedy@udel.edu> - 2014-11-02 15:08 -0500
Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Ned Batchelder <ned@nedbatchelder.com> - 2014-11-02 15:43 -0500
Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-11-02 07:23 -0800
Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-11-02 15:30 +0000
Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-11-02 09:51 -0800
Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-11-02 11:22 -0800
Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-11-02 19:39 +0000
Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-11-02 13:59 -0800
Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-11-02 22:31 +0000
Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Chris Angelico <rosuav@gmail.com> - 2014-11-03 10:33 +1100
Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-11-02 14:20 -0800
Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-11-02 22:34 +0000
Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-11-03 08:27 -0800
Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Chris Angelico <rosuav@gmail.com> - 2014-11-04 03:41 +1100
Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-11-03 13:28 -0800
Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-11-03 21:42 +0000
| From | Simon Evans <musicalhacksaw@yahoo.co.uk> |
|---|---|
| Date | 2014-11-01 07:17 -0700 |
| Subject | Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 |
| Message-ID | <9580043d-a75b-4b87-9a21-1b9c0347671f@googlegroups.com> |
Hi Programmers, I have downloaded, installed, and can access the LXMLTreeBuilder/lxml, from Python2.7. however I have also downloaded HTMLTreeBuilder/html5lib but cannot get console to recognize the download, even using the code the download site suggests. I did put it in the Python2.7 directory, but unlike the HTML one, it doesn't recognize it, so the import statement returns an error. Can anyone tell me how I might proceed so's these TreeBuilders/ Parsers will work on my Python console ? I also will have to install HTMLParserTreeBuilder/html.parser and LXMLTreeBuilderForXML/lxml but best to cross that bridge when gotten to, as they say. Thank you for reading.I look forward to hearing from you. Yours Simon Evans
[toc] | [next] | [standalone]
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2014-11-01 16:43 -0400 |
| Message-ID | <mailman.15398.1414874603.18130.python-list@python.org> |
| In reply to | #80088 |
On 11/1/2014 10:17 AM, Simon Evans wrote: > Hi Programmers, I have downloaded, installed, and can access the > LXMLTreeBuilder/lxml, from Python2.7. however I have also downloaded > HTMLTreeBuilder/html5lib but cannot get console to recognize the > download, even using the code the download site suggests. I did put > it in the Python2.7 directory, What OS are you using. Exactly where dod you put each lib? Are each of the two installs a single module or a package directory? If the latter, does the directory contain __init__.py > but unlike the HTML one, it doesn't > recognize it, so the import statement returns an error. There must be some difference. Look carefully. And please post the traceback. -- Terry Jan Reedy
[toc] | [prev] | [next] | [standalone]
| From | Simon Evans <musicalhacksaw@yahoo.co.uk> |
|---|---|
| Date | 2014-11-02 06:58 -0800 |
| Message-ID | <1f3c5d34-b5d1-4ede-952b-fed54b817fd7@googlegroups.com> |
| In reply to | #80088 |
Dear Terry Reedy I am using operating system Windows 7. I put the HTML TreeBuilder / htm5 library into the Python2.7 folder. I read that the LXML Treebuilder /lmxl installs itself automatically to the Python2.7 installation, so that is why I am not having difficulty with that installation. I don't think it really matters where the lxml download ended up necessarily, all I want is to know how I can install it so it works, I cannot get any feedback because it isn't working, all I get is the automated inbuilt response about 'Do I want a treebuilder/ parser that is appropriate to the input' or words to that effect. What I want to know is how to get this lxml treebuilder/parser to run, ie: what is the protocol for running the lxml download so's it'll run, or what sort of code to I put to my python console in order to get it to run, seeing as the input suggested by the download site does not get it to run. Maybe I should rephrase my question : how do I install LXMLTreeBuilder/lxml, and how do I download and install HTMLParserTreeBuilder and LXMLTreeBuilderForXML to my Python2.7, please ? I can post the Traceback but all it says is that it doesn't recognise any input with 'html5lib' in it. I will post the console response if it is important, but I can't see how it is relevant to my request - which is how do I get these 'treebuilder/ parsers' to install and run.
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-11-02 15:27 +0000 |
| Message-ID | <mailman.15408.1414942034.18130.python-list@python.org> |
| In reply to | #80120 |
On 02/11/2014 14:58, Simon Evans wrote: > Dear Terry Reedy > I am using operating system Windows 7. > I put the HTML TreeBuilder / htm5 library into the Python2.7 folder. > I read that the LXML Treebuilder /lmxl installs itself automatically to the Python2.7 installation, so that is why I am not having difficulty with that installation. > I don't think it really matters where the lxml download ended up necessarily, all I want is to know how I can install it so it works, I cannot get any feedback because it isn't working, all I get is the automated inbuilt response about 'Do I want a treebuilder/ parser that is appropriate to the input' or words to that effect. What I want to know is how to get this lxml treebuilder/parser to run, ie: what is the protocol for running the lxml download so's it'll run, or what sort of code to I put to my python console in order to get it to run, seeing as the input suggested by the download site does not get it to run. Maybe I should rephrase my question : how do I install LXMLTreeBuilder/lxml, and how do I download and install HTMLParserTreeBuilder and LXMLTreeBuilderForXML to my Python2.7, > please ? I can post the Traceback but all it says is that it doesn't recognise any input with 'html5lib' in it. I will post the console response if it is important, but I can't see how it is relevan > t to my request - which is how do I get these 'treebuilder/ parsers' to install and run. > You're not the first person to have this problem, so do either of these help? http://stackoverflow.com/questions/17766725/how-to-re-install-lxml http://stackoverflow.com/questions/21322948/beautifulsoup-wont-recognize-lxml Also note that your post consists of single line paragraphs which makes it difficult to read. Can you change your email settings to correct this or if you're on google groups action this https://wiki.python.org/moin/GoogleGroupsPython to prevent us seeing them, thanks. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2014-11-02 15:08 -0500 |
| Message-ID | <mailman.15415.1414958940.18130.python-list@python.org> |
| In reply to | #80120 |
On 11/2/2014 9:58 AM, Simon Evans wrote: > Dear Terry Reedy I am using operating system Windows 7. I put the > HTML TreeBuilder / htm5 library into the Python2.7 folder. Both packages should go in python27/Lib/site-packages, where a 'package' equals a directory with a __init__.py module. > I read > that the LXML Treebuilder /lmxl installs itself automatically to the > Python2.7 installation, so that is why I am not having difficulty > with that installation. I presume it put itself in site-packages, where it belongs. > I don't think it really matters where the > lxml download ended up necessarily, all I want is to know how I can > install it so it works, I cannot get any feedback because it isn't > working, all I get is the automated inbuilt response about 'Do I want > a treebuilder/ parser that is appropriate to the input' or words to > that effect. What I want to know is how to get this lxml > treebuilder/parser to run, ie: what is the protocol for running the > lxml download so's it'll run, or what sort of code to I put to my > python console in order to get it to run, seeing as the input > suggested by the download site does not get it to run. Maybe I > should rephrase my question : how do I install LXMLTreeBuilder/lxml, > and how do I download and install HTMLParserTreeBuilder and > LXMLTreeBuilderForXML to my Python2.7, please ? > I can post the > Traceback but all it says is that it doesn't recognise any input with > 'html5lib' in it. I will post the console response if it is > important, but I can't see how it is relevan t to my request - which > is how do I get these 'treebuilder/ parsers' to install and run. Why do newbies like you fight so hard against cutting and pasting a trackback? -- Terry Jan Reedy
[toc] | [prev] | [next] | [standalone]
| From | Ned Batchelder <ned@nedbatchelder.com> |
|---|---|
| Date | 2014-11-02 15:43 -0500 |
| Message-ID | <mailman.15416.1414960997.18130.python-list@python.org> |
| In reply to | #80120 |
On 11/2/14 3:08 PM, Terry Reedy wrote: > > I can post the >> Traceback but all it says is that it doesn't recognise any input with >> 'html5lib' in it. I will post the console response if it is >> important, but I can't see how it is relevan t to my request - which >> is how do I get these 'treebuilder/ parsers' to install and run. > > Why do newbies like you fight so hard against cutting and pasting a > trackback? Simon, I'm sure Terry didn't mean that to come out as stern as it sounds. Providing the actual error reports may not seem important, but you'd be surprised the kinds of clues that lurk there. -- Ned Batchelder, http://nedbatchelder.com
[toc] | [prev] | [next] | [standalone]
| From | Simon Evans <musicalhacksaw@yahoo.co.uk> |
|---|---|
| Date | 2014-11-02 07:23 -0800 |
| Message-ID | <4a7f3057-8244-4eb6-b656-309371102f98@googlegroups.com> |
| In reply to | #80088 |
I have proceeded to click on the 'setup.py' in the html5-0.999 lib and got a python console for a few seconds, this may have been the installation of the HTML5 parser/ treebuilder - I will have to put the code that did not work to it previously to it again, hopefully it will.
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-11-02 15:30 +0000 |
| Message-ID | <mailman.15409.1414942507.18130.python-list@python.org> |
| In reply to | #80122 |
On 02/11/2014 15:23, Simon Evans wrote: > I have proceeded to click on the 'setup.py' in the html5-0.999 lib and got a python console for a few seconds, this may have been the installation of the HTML5 parser/ treebuilder - I will have to put the code that did not work to it previously to it again, hopefully it will. > Please post some context, we're not yet mind readers :) Can you use pip to do your installation, it's far easier than other mechanisms? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | Simon Evans <musicalhacksaw@yahoo.co.uk> |
|---|---|
| Date | 2014-11-02 09:51 -0800 |
| Message-ID | <15b4dae1-ba1a-43f0-9be1-f23a7e67a15b@googlegroups.com> |
| In reply to | #80088 |
Dear Mark Lawrence, I have tried inputting the code in the first link, re: >>> import lxml >>> import lxml.etree >>> import bs4.builder.htmlparser Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named htmlparser >>> import bs4.builder._lxml >>> import bs4.builder.html5lib Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named html5lib >>> which tells me lxml is installed, but that neither html nor html5 is installed.
[toc] | [prev] | [next] | [standalone]
| From | Simon Evans <musicalhacksaw@yahoo.co.uk> |
|---|---|
| Date | 2014-11-02 11:22 -0800 |
| Message-ID | <bae6fcb0-f763-4185-ae92-ae88ee1ee793@googlegroups.com> |
| In reply to | #80088 |
I have got the html5lib-0.999.tar.gz and the HTMLParser-0.0.2.tar.gz files in my Downloads the problem is how I install them to Python2.7. The lxml-3.3.3.win32-py2.7 is an exe file, which upon clicking will install but obviously the html and the html5 installations are not so straightforward.
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-11-02 19:39 +0000 |
| Message-ID | <mailman.15413.1414957197.18130.python-list@python.org> |
| In reply to | #80131 |
On 02/11/2014 19:22, Simon Evans wrote: > I have got the html5lib-0.999.tar.gz > > and the HTMLParser-0.0.2.tar.gz files in my Downloads the problem is how I > > install them to Python2.7. > > The lxml-3.3.3.win32-py2.7 is an exe file, which upon clicking will install > > but obviously the html and the html5 installations are not so > > straightforward. > For the second time will you please quote some context. Have you tried using pip as I've already suggested? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | Simon Evans <musicalhacksaw@yahoo.co.uk> |
|---|---|
| Date | 2014-11-02 13:59 -0800 |
| Message-ID | <75794999-f188-470a-96d1-3d8fca80cbf7@googlegroups.com> |
| In reply to | #80088 |
Oh I don't mind quoting console output, I just thought I'd be sparing you
unnecessary detail.
output was going nicely as I input text from my 'Getting Started with
Beautiful Soup' even when the author reckoned things would go wrong - due to
lxml not being installed, things went right, because I had already installed
it, re:
----------------------------------------------------------------------------
page 17
----------------------------------------------------------------------------
Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib2
>>> from bs4 import BeautifulSoup
>>> url = "http://www.packtpub.com/books"
>>> page = urllib2.urlopen(url)
>>> soup_packtpage = BeautifulSoup(page)
>>> with open("foo.html","r") as foo_file:
... soup_foo = Soup(foo_file)
File "<stdin>", line 2
soup_foo = Soup(foo_file)
^
IndentationError: expected an indented block
>>> soup_foo= BeautifulSoup("foo.html")
----------------------------------------------------------------------------
page 18
----------------------------------------------------------------------------
>>> print(soup_foo)
<html><body><p>foo.html</p></body></html>
>>> soup_url = BeautifulSoup("http://www.packtpub.com/books")
>>> print(soup_url)
<html><body><p>http://www.packtpub.com/books</p></body></html>
>>> helloworld = "<p>Hello World</p>"
>>> soup_string = BeautifulSoup(helloworld)
>>> print(soup_string)
<html><body><p>Hello World</p></body></html>
----------------------------------------------------------------------------
page 19: no code in text on this page
----------------------------------------------------------------------------
page 20
----------------------------------------------------------------------------
>>> soup_xml = BeautifulSoup(helloworld,features= "xml")
>>> soup_xml = BeautifulSoup(helloworld,"xml")
>>> print(soup_xml)
<?xml version="1.0" encoding="utf-8"?>
<p>Hello World</p>
>>> soup_xml = BeautifulSoup(helloworld,features = "xml")
>>> print(soup_xml)
<?xml version="1.0" encoding="utf-8"?>
<p>Hello World</p>
>>>
----------------------------------------------------------------------------
Then on bottom of page 20 it says 'we should install the required parsers using easy-install,pip or setup.py install' but as I can't get the downloads of html or html5 parsers, text code halfway down returns statutory response regarding requisite parser needing to be installed, re:
----------------------------------------------------------------------------
page 21
----------------------------------------------------------------------------
>>> invalid_html = '<a invalid content'
>>> soup_invalid_html = BeautifulSoup(invalid_html,'lxml')
>>> print(soup_invalid_html)
<html><body><a content="" invalid=""></a></body></html>
>>> soup_invalid_html = BeautifulSoup(invalid_html,'html5lib')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\bs4\__init__.py", line 155, in __init__
% ",".join(features))
ValueError: Couldn't find a tree builder with the features you requested: html5lib. Do you need to install a parser library?
>>>
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-11-02 22:31 +0000 |
| Message-ID | <mailman.15421.1414967524.18130.python-list@python.org> |
| In reply to | #80139 |
On 02/11/2014 21:59, Simon Evans wrote:
>
> Oh I don't mind quoting console output, I just thought I'd be sparing you
>
> unnecessary detail.
>
> output was going nicely as I input text from my 'Getting Started with
>
> Beautiful Soup' even when the author reckoned things would go wrong - due to
>
> lxml not being installed, things went right, because I had already installed
>
> it, re:
> ----------------------------------------------------------------------------
> page 17
> ----------------------------------------------------------------------------
> Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win
> 32
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import urllib2
>>>> from bs4 import BeautifulSoup
>>>> url = "http://www.packtpub.com/books"
>>>> page = urllib2.urlopen(url)
>>>> soup_packtpage = BeautifulSoup(page)
>>>> with open("foo.html","r") as foo_file:
> ... soup_foo = Soup(foo_file)
> File "<stdin>", line 2
> soup_foo = Soup(foo_file)
> ^
> IndentationError: expected an indented block
>>>> soup_foo= BeautifulSoup("foo.html")
> ----------------------------------------------------------------------------
> page 18
> ----------------------------------------------------------------------------
>>>> print(soup_foo)
> <html><body><p>foo.html</p></body></html>
>>>> soup_url = BeautifulSoup("http://www.packtpub.com/books")
>>>> print(soup_url)
> <html><body><p>http://www.packtpub.com/books</p></body></html>
>>>> helloworld = "<p>Hello World</p>"
>>>> soup_string = BeautifulSoup(helloworld)
>>>> print(soup_string)
> <html><body><p>Hello World</p></body></html>
> ----------------------------------------------------------------------------
> page 19: no code in text on this page
> ----------------------------------------------------------------------------
> page 20
> ----------------------------------------------------------------------------
>>>> soup_xml = BeautifulSoup(helloworld,features= "xml")
>>>> soup_xml = BeautifulSoup(helloworld,"xml")
>>>> print(soup_xml)
> <?xml version="1.0" encoding="utf-8"?>
> <p>Hello World</p>
>>>> soup_xml = BeautifulSoup(helloworld,features = "xml")
>>>> print(soup_xml)
> <?xml version="1.0" encoding="utf-8"?>
> <p>Hello World</p>
>>>>
> ----------------------------------------------------------------------------
> Then on bottom of page 20 it says 'we should install the required parsers using easy-install,pip or setup.py install' but as I can't get the downloads of html or html5 parsers, text code halfway down returns statutory response regarding requisite parser needing to be installed, re:
> ----------------------------------------------------------------------------
> page 21
> ----------------------------------------------------------------------------
>>>> invalid_html = '<a invalid content'
>>>> soup_invalid_html = BeautifulSoup(invalid_html,'lxml')
>>>> print(soup_invalid_html)
> <html><body><a content="" invalid=""></a></body></html>
>>>> soup_invalid_html = BeautifulSoup(invalid_html,'html5lib')
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "C:\Python27\lib\site-packages\bs4\__init__.py", line 155, in __init__
> % ",".join(features))
> ValueError: Couldn't find a tree builder with the features you requested: html5lib. Do you need to install a parser library?
>>>>
Have you tried this from the command prompt?
pip install html5lib
And please do something about the extra newlines and single lined
paragraphs above, there's no need for it all.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-11-03 10:33 +1100 |
| Subject | Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 |
| Message-ID | <mailman.15423.1414971196.18130.python-list@python.org> |
| In reply to | #80139 |
On Mon, Nov 3, 2014 at 8:59 AM, Simon Evans <musicalhacksaw@yahoo.co.uk> wrote: > Oh I don't mind quoting console output, I just thought I'd be sparing you > unnecessary detail. One of the tricks experienced programmers learn is how to skim a pile of output for what's important. When that output is a Python traceback, I would guess that most of python-list has some experience with reading them; regular responders like Ned, Terry, and Mark, in all probability, have read more tracebacks than I've drunk hot chocolates [1], so when they ask you to post a traceback, you can be confident that they can cope with the level of detail :) ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Simon Evans <musicalhacksaw@yahoo.co.uk> |
|---|---|
| Date | 2014-11-02 14:20 -0800 |
| Message-ID | <fab305c9-6aa8-488d-ab67-dff3fbdddf41@googlegroups.com> |
| In reply to | #80088 |
What I meant to say was I can't get the html5 or the html parsers to install, I have got their downloads in their respective directories in the downloads directory.
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-11-02 22:34 +0000 |
| Message-ID | <mailman.15422.1414967706.18130.python-list@python.org> |
| In reply to | #80144 |
On 02/11/2014 22:20, Simon Evans wrote: > What I meant to say was I can't get the html5 or the html parsers to install, I have got their downloads in their respective directories in the downloads directory. > For the third time of asking will you please provide some context. For the fourth time have you tried from the command prompt:- pip install html5lib ??? For (at least) the third time will you please do something about one line paragraphs. -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
[toc] | [prev] | [next] | [standalone]
| From | Simon Evans <musicalhacksaw@yahoo.co.uk> |
|---|---|
| Date | 2014-11-03 08:27 -0800 |
| Message-ID | <20d86ab1-dfe0-46c6-a5fe-065392766e10@googlegroups.com> |
| In reply to | #80088 |
I input 'pip install html5lib' to the Python 2.7 console and got :
>>> pip install html5lib
File "<stdin>", line 1
pip install html5lib
^
SyntaxError: invalid syntax
>>>
I am not sure what you mean about 'single line paragraphs'. I put my text
into double line spacing in my last missive, I left the code input/ output
in single line spacing as that is how it reads from the console, after all
who am I to alter it? Regarding 'context' if you are referring to the text
I am using, it is from 'Getting Started in Beautiful Soup' by Vineeth G.
Nair.
For what its worth some of the subsequent code in the book runs, but not
all, and I think this may be due to the parser installation factor, and I
wanted to work through the book (112 pages) without any errors being
returned.
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-11-04 03:41 +1100 |
| Subject | Re: Installing Parsers/Tree Builders to, and accessing these packages from Python2.7 |
| Message-ID | <mailman.15435.1415032891.18130.python-list@python.org> |
| In reply to | #80160 |
On Tue, Nov 4, 2014 at 3:27 AM, Simon Evans <musicalhacksaw@yahoo.co.uk> wrote: > I input 'pip install html5lib' to the Python 2.7 console and got : > >>>> pip install html5lib > File "<stdin>", line 1 > pip install html5lib > ^ > SyntaxError: invalid syntax >>>> This should be run from your command interpreter - cmd.exe, bash, or whatever you normally run programs from. > I am not sure what you mean about 'single line paragraphs'. I put my text > > into double line spacing in my last missive, I left the code input/ output > > in single line spacing as that is how it reads from the console, after all > > who am I to alter it? Regarding 'context' if you are referring to the text > > I am using, it is from 'Getting Started in Beautiful Soup' by Vineeth G. > > Nair. Why the double line spacing? I don't get that... and I think that's what was meant. "Context" in this context means quoted text from previous posts. http://en.wikipedia.org/wiki/Posting_style#Interleaved_style The parts with the angle brackets at the beginning are quoted text, providing context for what you're saying. ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Simon Evans <musicalhacksaw@yahoo.co.uk> |
|---|---|
| Date | 2014-11-03 13:28 -0800 |
| Message-ID | <12867b6e-ede8-4136-a1f9-48d922ab4335@googlegroups.com> |
| In reply to | #80088 |
I input to the cmd console 'pip install html5lib' but again got an error return. I thought one of the participants was unhappy about single line spacing (re: single line paragraphs') Okay I will go back to single line spacing, I don't think it is all that important, really. Anyway this is my console's response:- Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\Users\Intel Atom>pip install html5lib 'pip' is not recognized as an internal or external command, operable program or batch file. C:\Users\Intel Atom>
[toc] | [prev] | [next] | [standalone]
| From | Mark Lawrence <breamoreboy@yahoo.co.uk> |
|---|---|
| Date | 2014-11-03 21:42 +0000 |
| Message-ID | <mailman.15439.1415050974.18130.python-list@python.org> |
| In reply to | #80163 |
On 03/11/2014 21:28, Simon Evans wrote: > I input to the cmd console 'pip install html5lib' but again got an error return. I thought one of the participants was unhappy about single line spacing (re: single line paragraphs') Okay I will go back to single line spacing, I don't think it is all that important, really. Thank you for being so inconsiderate. Yet another single line paragraph that stretches out well over the horizon. Add that to the potential for double line spacing and all we end up with is a right mess. You've also replied without any context again. > Anyway this is my console's response:- > > > Microsoft Windows [Version 6.1.7601] > Copyright (c) 2009 Microsoft Corporation. All rights reserved. > > C:\Users\Intel Atom>pip install html5lib > 'pip' is not recognized as an internal or external command, > operable program or batch file. > > C:\Users\Intel Atom> > > Either you haven't installed pip (it comes with the Python 3.4 installer) or it's not on your path. In my installation I've pip.exe, pip3.4.exe and pip3.exe in C:\Python34\Scripts so what have you in your equivalent and what is your path set to? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web