1

I am new to Python. I am just trying to extract a string from an HTML file. I cannot make it work. Everyone is talking about Beautiful Soup but it doesn't work for me...

This is my error:

ImportError: No module named bs4

I installed Beautiful Soup 4 already but I believe it is in the wrong folder:

sudo pip install beautifulsoup4
Requirement already satisfied (use --upgrade to upgrade): beautifulsoup4 in /usr/local/lib/python2.7/dist-packages
Cleaning up...

I am using Python 3.2. How do I force Beautiful Soup to install in the other folder?

user1983400
  • 369
  • 3
  • 4
  • 10

1 Answers1

1

Look, I suggest you download first the package of BeautifulSoup from its source in https://pypi.python.org/pypi/BeautifulSoup, once this has completed go to the folder where you download the compressed file , decompress the file and then inside you will see a python file named setup.py. This is the install file of the package, you need to run a command prompt in the folder and execute teh following line :

python setup.py install

This is another way of install Python packages without pip.

Victor Sigler
  • 23,243
  • 14
  • 88
  • 105