[Tutor] trouble with beautiful soup

marcus lütolf marcus.luetolf at bluewin.ch
Thu Dec 31 08:19:41 EST 2015


Dear Pythonistas,
finally I could install BeautifulSoup on my laptop. Please forget my most recent mail below.
But if I try the same procedure on my pc i get this and I have no idea why  this code I used for exercises gets into this command even after havin deleted all
Ma saved exercise codes referring to parsing the web:

Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. Alle Rechte vorbehalten.

C:\Users\marcus>cd c:\Python27\Scripts

c:\Python27\Scripts>pip install beutifulsoup
<h1>The First Page</h1>
<p>
If you like, you can switch to the
<a href="http://www.dr-chuck.com/page2.htm">
Second Page</a>.
</p>
Traceback (most recent call last):
  File "c:\python27\lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "c:\Python27\Scripts\pip.exe\__main__.py", line 5, in <module>
  File "c:\python27\lib\site-packages\pip\__init__.py", line 15, in <module>
    from pip.vcs import git, mercurial, subversion, bazaar  # noqa
  File "c:\python27\lib\site-packages\pip\vcs\mercurial.py", line 10, in <module>
    from pip.download import path_to_url
  File "c:\python27\lib\site-packages\pip\download.py", line 38, in <module>
    from pip._vendor import requests, six
  File "c:\python27\lib\site-packages\pip\_vendor\requests\__init__.py", line 58, in <module>
    from . import utils
  File "c:\python27\lib\site-packages\pip\_vendor\requests\utils.py", line 26, in <module>
    from .compat import parse_http_list as _parse_list_header
  File "c:\python27\lib\site-packages\pip\_vendor\requests\compat.py", line 38, in <module>
    from urllib2 import parse_http_list
ImportError: cannot import name parse_http_list

c:\Python27\Scripts>









Dear Pythonistas,
o.K., thats what I get from the command line:

Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. Alle Rechte vorbehalten.

C:\Users\marcus>c:\Python27\Scripts>dir pip*
Der Befehl "c:\Python27\Scripts" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

C:\Users\marcus>

As mentioned earlier, the error message is in german and says: The command "c:\Python27\Scripts" is either mistyped or could not be found.
With the cd command I get:

Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. Alle Rechte vorbehalten.

C:\Users\marcus>cd c:\Python27\Scripts> dir pip*
Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch.

C:\Users\marcus>

The error message is also in german and says: The syntax for the filename, directory name or  drive name is wrong.
But if I use 2 steps I get:

C:\Users\marcus>cd c:\Python27\Scripts

c:\Python27\Scripts>dir pip*
 Datenträger in Laufwerk C: ist OS
 Volumeseriennummer: 4EE4-17CA

 Verzeichnis von c:\Python27\Scripts

25.12.2015  11:57            98.124 pip.exe
25.12.2015  11:57            98.124 pip2.7.exe
25.12.2015  11:57            98.124 pip2.exe
               3 Datei(en),        294.372 Bytes
               0 Verzeichnis(se), 411.226.550.272 Bytes frei

c:\Python27\Scripts>

How do I proceed from here ?
Thanks an regards, Marcus.

.........................................................................................................................................................................................................................................................................
-----Ursprüngliche Nachricht-----
Von: Tutor [mailto:tutor-bounces+marcus.luetolf=bluewin.ch at python.org] Im Auftrag von Mark Lawrence
Gesendet: Montag, 28. Dezember 2015 20:23
An: tutor at python.org
Betreff: Re: [Tutor] trouble with beautiful soup

On 28/12/2015 17:24, marcus lütolf wrote:
> Dear Pythonistas
> Hi Danny,
>
> I am grateful for your precise instruchtions.
> Yes ideed, I tried all of the steps mentioned below which I shoudn't have done fumling around with this task now  for hours and days.
> I even tried to do it on may laptop using W7 64bit and after deleting and reinstalling Python27.
> The youtube video  I was referring to was : https://www.youtube.com/watch?v=0snOcBQ3I0g.
>
> Now for pip: I found pip in C:\Python27\Lib\site-packages. But if I type in pip or pip.exe I get (in german): The command "pip" is  either typed wrong or could not be found (I can't cut and paste from the command window).
> As you might have noticed English is not my natural language and this can lead sometimes to interpretation errors.
>
> Regards, Marcus.

c:\Python27\Scripts>dir pip*
  Volume in drive C has no label.
  Volume Serial Number is AE77-B408

  Directory of c:\Python27\Scripts

20/09/2015  20:22            98,124 pip.exe
20/09/2015  20:22            98,124 pip2.7.exe
20/09/2015  20:22            98,124 pip2.exe
                3 File(s)        294,372 bytes
                0 Dir(s)  869,655,580,672 bytes free

--
My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language.

Mark Lawrence



_______________________________________________
Tutor maillist  -  Tutor at python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus



More information about the Tutor mailing list