ImportError: No module named BeautifulSoup

前端 未结 8 1182
無奈伤痛
無奈伤痛 2020-11-28 23:50

I have installed BeautifulSoup using easy_install and trying to run following script

from BeautifulSoup import BeautifulSoup
import re

doc = [\'         


        
8条回答
  •  甜味超标
    2020-11-29 00:38

    I had the same problem with eclipse on windows 10.

    I installed it like recommende over the windows command window (cmd) with:

    C:\Users\NAMEOFUSER\AppData\Local\Programs\Python\beautifulsoup4-4.8.2\setup.py install 
    

    BeautifulSoup was install like this in my python directory:

    C:\Users\NAMEOFUSE\AppData\Local\Programs\Python\Python38\Lib\site-packages\beautifulsoup4-4.8.2-py3.8.egg
    

    After manually coping the bs4 and EGG-INFO folders into the site-packages folder everything started to work, also the example:

    from bs4 import BeautifulSoup
    
    
    html = """
        
            
                

    Ich bin ein Absatz!

    """ print(html) soup = BeautifulSoup(html, 'html.parser') print(soup.find_all("p"))

提交回复
热议问题