12

I want to try and make a program that downloads images from the internet, and I have found a guide that uses Beautiful soup. I have heard of Beautiful Soup before, so I figured that I would try it out. My only issue is that I can't seem to find a version for Python 3. I went to their website, but I was unable to find a version that worked with Python 3.

Whenever I would run the setup.py file, I would get an error that was too quick to read, but it looked like it was saying syntax error. So I looked at the code and realized that there weren't any parenthesis in front or after strings that were supposed to be printed.

I have tried numerous different webpages and different searches, but was unable to find an answer.

I'm also sorry if this is not a question related to programming, if it is not, please leave a comment on this question and I will delete the question ASAP.

7
  • From here: "I use Python 2.7 and Python 3.2 to develop Beautiful Soup, but it should work with other recent versions."
    – MrAlias
    Jul 6, 2014 at 1:55
  • 1
    Have you tried pip install beautifulsoup4? It should work under Python 3.x
    – Dominic K
    Jul 6, 2014 at 1:55
  • ...also it installs fine with pip and imports just fine in all my python3.4.1 scripts. :)
    – MrAlias
    Jul 6, 2014 at 1:56
  • it installs fine using pip, you probably downloaded a version for python2 Jul 6, 2014 at 1:56
  • I'm sorry I"m so inexperienced, but this is my issue at the moment. When people are saying "pip install beautifulsoup4" I'm not sure where to run it. s5.postimg.org/d9byjulrb/Capture.png
    – Kyle Me
    Jul 6, 2014 at 2:38

4 Answers 4

18

BeautifulSoup4 installs fine with python3.

pip install beautifulsoup4

Make sure your version of pip is for python3!

pip -V
0

I'm new to this as well.

I agree - it's not always clear from forum answers where to type the various suggestions when you're new to the subject.

Start by opening a command prompt. You can do this by typing CMD into the searchbox after pressing the start button.

At the command prompt, type "python -m pip install beautifulsoup4"

At this point, the module should be downloaded and installed.

To check that it's installed correctly, you can open the python command line program - (the one that gives you ">>>" prompts) and type "from bs4 import BeautifulSoup"

Note that everything is case sensitive, so be careful when you type.

If no errors are reported, the module is correctly installed on your machine and you can proceed to your next hurdle. :)

Good luck.

0

Try using "python -m pip install beautifulsoup4" This line is working perfectly fine for me on Python 3.4

0

Below work for me. Source of content is quora.com.

Make sure you download the recent beautifulsoup version. For Windows how to install beautifulsoup4 for python2 or python3. Place the file you downloaded in any file directory on your computer.

First locate where your Python file directory is below am using C:\Python27 To open open command prompt type cmd into the run file.

in command prompt do this. type cd Python27 then type pip install beautifulsoup4. You may have to use the full path: C:\Python27\Scripts\pip install beauifulsoup4 or even C:\Python27\Scripts\pip.exe install beautifulsoup4

for Python3 in command prompt do this. type cd Python34 then type pip install beautifulsoup4 You may have to use the full path: C:\Python34\Scripts\pip install beauifulsoup4 or even C:\Python34\Scripts\pip.exe install beautifulsoup4

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.