Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #71498
| Date | 2014-05-13 15:48 +0100 |
|---|---|
| From | MRAB <python@mrabarnett.plus.com> |
| Subject | Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. |
| References | (6 earlier) <7b33a525-58ee-4009-94c4-f9ed69eb3af0@googlegroups.com> <mailman.9898.1399852081.18130.python-list@python.org> <d40dcc5b-62d8-4354-b22e-d892f5a4c66f@googlegroups.com> <mailman.9922.1399935297.18130.python-list@python.org> <81acc9a1-f3d5-4379-9b29-1be4966f6c35@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.9971.1399992537.18130.python-list@python.org> (permalink) |
On 2014-05-13 12:59, Simon Evans wrote:
> Dear Ian, and other programmers, thank you for your advice.
> I am resending the last message because this twattish cut and paste facility on my computer has a knack of chopping off ones original message, I will try to convey the right message this time :
>
> I have removed the original Beautiful Soup 4 download, that I had unzipped to my Beautiful Soup directory on the C drive.
> I downloaded the latest version of Beautiful Soup 4 from the Crummy site.
> I unzipped it, and removed the contents of the unzipped directory and placed contents in my Beautiful Soup directory, and again had the same output to my console re:
> --------------------------------------------------------------------------------
>
> Microsoft Windows [Version 6.1.7601]
> Copyright (c) 2009 Microsoft Corporation. All rights reserved.
>
> C:\Users\Intel Atom>cd "c:\Beautiful Soup"
>
> c:\Beautiful Soup>c:\Python27\python setup.py install
>
> running install
> running build
> running build_py
> error: package directory 'bs4' does not exist
>
>
> c:\Beautiful Soup>
> -------------------------------------------------------------------------------
> I have made a note of all the contents of the downloaded and unzipped BS4,ie the contents of my Beautiful Soup folder on the C drive, which is as follows:
> -------------------------------------------------------------------------------
>
> running install
> running build
> running build_py
>
> error: package directory 'bs4' does not existinit
> _html5lib
> _htmlparser
> _lxml
> 6.1
> AUTHORS
> conf
> COPYING
> dammit
> demonstration_markup
> element
> index.rst
> Makefile
> NEWS
> PGK-INFO
> README
> setup
> test_builder_registry
> test_docs
> test_html5lib
> test_htmlparser
> text_lxml
> test_soup
> test_tree
> testing
> TODO
> --------------------------------------------------------------------------------
> I can see no bs4 folder within the contents.
> I can not see any setup.py file either, but this is how I downloaded it.
> I am only following instructions as suggested.
> I do not understand why it is not working.
> I hope someone can direct me in the right direction, as I seem to be stuck, and I don't think it has much bearing on my fluency or lack of it with Python.
>
I think I see your problem: you've unpacked everything into a single
folder instead of a folder hierarchy.
(It also looks like you have Explorer configured to hide the file
extensions. That's generally _not_ recommended.)
Try this:
#! python3.4
# -*- coding: utf-8 -*-
from os.path import splitext
import gzip
import tarfile
# The path of the downloaded file.
tar_gz_path = r'C:\beautifulsoup4-4.3.2.tar.gz'
# Unpack the .tar.gz file to a .tar file.
tar_path, ext = splitext(tar_gz_path)
with gzip.open(tar_gz_path, 'rb') as from_file:
with open(tar_path, 'wb') as to_file:
chunk = from_file.read()
to_file.write(chunk)
# Unpack the .tar file to a folder.
folder, ext = splitext(tar_path)
tar = tarfile.open(tar_path)
tar.extractall(folder)
tar.close()
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-05-10 09:58 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Chris Angelico <rosuav@gmail.com> - 2014-05-11 03:03 +1000
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Terry Reedy <tjreedy@udel.edu> - 2014-05-10 14:39 -0400
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Chris Angelico <rosuav@gmail.com> - 2014-05-11 09:23 +1000
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Dave Angel <d@davea.name> - 2014-05-10 22:16 -0400
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-05-11 12:05 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Chris Angelico <rosuav@gmail.com> - 2014-05-12 05:17 +1000
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-05-11 13:03 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. MRAB <python@mrabarnett.plus.com> - 2014-05-11 21:19 +0100
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Terry Reedy <tjreedy@udel.edu> - 2014-05-11 16:31 -0400
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-05-11 15:03 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. MRAB <python@mrabarnett.plus.com> - 2014-05-11 23:10 +0100
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-05-11 16:19 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-05-11 16:22 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-05-11 16:37 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Ian Kelly <ian.g.kelly@gmail.com> - 2014-05-11 17:47 -0600
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-05-12 09:35 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-05-12 12:17 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Ian Kelly <ian.g.kelly@gmail.com> - 2014-05-12 16:54 -0600
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-05-13 04:52 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-05-13 04:59 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-05-13 14:23 +0100
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. MRAB <python@mrabarnett.plus.com> - 2014-05-13 15:48 +0100
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-05-14 12:28 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Ian Kelly <ian.g.kelly@gmail.com> - 2014-05-14 13:33 -0600
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Chris Angelico <rosuav@gmail.com> - 2014-05-15 05:36 +1000
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-05-15 02:22 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-05-15 04:25 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-05-15 04:30 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Dave Angel <davea@davea.name> - 2014-05-15 08:12 -0400
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Rustom Mody <rustompmody@gmail.com> - 2014-05-15 05:17 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Ian Kelly <ian.g.kelly@gmail.com> - 2014-05-13 10:33 -0600
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-05-14 11:58 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Ian Kelly <ian.g.kelly@gmail.com> - 2014-05-14 13:30 -0600
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-05-13 20:08 +0100
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Ian Kelly <ian.g.kelly@gmail.com> - 2014-05-11 18:02 -0600
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-05-12 09:02 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Terry Reedy <tjreedy@udel.edu> - 2014-05-11 19:49 -0400
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-05-12 09:17 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Chris Angelico <rosuav@gmail.com> - 2014-05-12 11:40 +1000
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Rustom Mody <rustompmody@gmail.com> - 2014-05-11 19:47 -0700
Re: How do I access 'Beautiful Soup' on python 2.7 or 3.4 , console or idle versions. Simon Evans <musicalhacksaw@yahoo.co.uk> - 2014-05-12 09:23 -0700
csiph-web