longzhou520 ·¢±íÓÚ 2021-1-30 12:47:16

from bs import BeautifulSoup

´óÀаï°ïº¢×Ó°É

˽¤Ï¤ê ·¢±íÓÚ 2021-1-30 12:50:24

°²×°beautifulsoup¿âÁËô

ÌÓ±ø ·¢±íÓÚ 2021-1-30 12:53:25

ÄãÕâ¸öÎļþÃû½Ðbs4.py£¬Äã¸Ä¸öÃû×Ö

qiuyouzhi ·¢±íÓÚ 2021-1-30 12:55:41

Ä㻹ÓиöÎļþ½Ðbs4¡£¡£

Twilight6 ·¢±íÓÚ 2021-1-30 12:57:02



ÄãÎļþ¼ÐÏÂÃûΪ bs4.py µÄÎļþ£¬°ÑÕâ¸öÎļþÃû¸ÄÏ£¬±ðÓÃÄ£¿éÃû×÷ΪÎļþÃû

»áµ¼ÖÂÄãÏëʹÓõÄÄ£¿éµ¼Èë³É×Ô¼ºÐ´µÄ´úÂëÎļþ£¬¶ø×Ô¼ºÐ´µÄ´úÂëÎļþûÓжÔÓ¦·½·¨£¬µ¼ÖÂ×îÖյı¨´í

longzhou520 ·¢±íÓÚ 2021-1-30 12:58:08

˽¤Ï¤ê ·¢±íÓÚ 2021-1-30 12:50
°²×°beautifulsoup¿âÁËô

C:\Users\86185>pip install beautifulsoup
Defaulting to user installation because normal site-packages is not writeable
Collecting beautifulsoup
Using cached BeautifulSoup-3.2.2.tar.gz (32 kB)
    ERROR: Command errored out with exit status 1:
   command: 'c:\program files\python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv = '"'"'C:\\Users\\86185\\AppData\\Local\\Temp\\pip-install-hhh19r4_\\beautifulsoup\\setup.py'"'"'; __file__='"'"'C:\\Users\\86185\\AppData\\Local\\Temp\\pip-install-hhh19r4_\\beautifulsoup\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\86185\AppData\Local\Temp\pip-pip-egg-info-8vyouq2s'
         cwd: C:\Users\86185\AppData\Local\Temp\pip-install-hhh19r4_\beautifulsoup\
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\86185\AppData\Local\Temp\pip-install-hhh19r4_\beautifulsoup\setup.py", line 3
      "You're trying to run a very old release of Beautiful Soup under Python 3. This will not work."<>"Please use Beautiful Soup 4, available through the pip package 'beautifulsoup4'."
                                                                                                       ^
    SyntaxError: invalid syntax
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
WARNING: You are using pip version 20.2.3; however, version 21.0 is available.
You should consider upgrading via the 'c:\program files\python39\python.exe -m pip install --upgrade pip' command.
°²×°±¨´íÁË

˽¤Ï¤ê ·¢±íÓÚ 2021-1-30 12:58:10

¿ÉÒÔ¿´Ï ÕâƪÎÄÕÂ
https://blog.csdn.net/qq_44809707/article/details/110725045

longzhou520 ·¢±íÓÚ 2021-1-30 13:00:46

˽¤Ï¤ê ·¢±íÓÚ 2021-1-30 12:58
¿ÉÒÔ¿´Ï ÕâƪÎÄÕÂ
https://blog.csdn.net/qq_44809707/article/details/110725045

¸Ðл´ó¼ÒÁË{:5_109:}

˽¤Ï¤ê ·¢±íÓÚ 2021-1-30 13:00:55

longzhou520 ·¢±íÓÚ 2021-1-30 12:58
C:%users\86185>pip install beautifulsoup
Defaulting to user installation because normal site-pack ...

ÄãµÄpipÉýϼ¶
python -m pip install --upgrade pip
Ò³: [1]
²é¿´ÍêÕû°æ±¾: from bs import BeautifulSoup