鱼C论坛

 找回密码
 立即注册
查看: 1263|回复: 4

[已解决]使用beautifulsoup4错误

[复制链接]
发表于 2021-8-16 18:10:13 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
我看了pip list
  1. C:\Users\??????>pip list
  2. Package                            Version
  3. ---------------------------------- ---------
  4. alabaster                          0.7.12
  5. altgraph                           0.16.1
  6. anaconda-client                    1.7.2
  7. anaconda-navigator                 1.9.7
  8. anaconda-project                   0.8.2
  9. asn1crypto                         0.24.0
  10. astroid                            2.2.5
  11. astropy                            3.1.2
  12. atomicwrites                       1.3.0
  13. attrs                              19.1.0
  14. Babel                              2.6.0
  15. backcall                           0.1.0
  16. backports.entry-points-selectable  1.1.0
  17. backports.os                       0.1.1
  18. backports.shutil-get-terminal-size 1.0.0
  19. beautifulsoup4                     4.7.1
  20. bitarray                           0.8.3
  21. bkcharts                           0.2
  22. bleach                             3.1.0
  23. bokeh                              1.0.4
  24. boto                               2.49.0
  25. Bottleneck                         1.2.1
  26. certifi                            2019.3.9
  27. cffi                               1.12.2
复制代码

但在IDLE上:
  1. >>> import beautifulsoup4
  2. Traceback (most recent call last):
  3.   File "<pyshell#1>", line 1, in <module>
  4.     import beautifulsoup4
  5. ModuleNotFoundError: No module named 'beautifulsoup4'
  6. >>> import beautifulsoup
  7. Traceback (most recent call last):
  8.   File "<pyshell#2>", line 1, in <module>
  9.     import beautifulsoup
  10. ModuleNotFoundError: No module named 'beautifulsoup'
  11. >>> import beautifulsoup4
  12. Traceback (most recent call last):
  13.   File "<pyshell#3>", line 1, in <module>
  14.     import beautifulsoup4
  15. ModuleNotFoundError: No module named 'beautifulsoup4'
  16. >>> import beautifulsoup4
  17. Traceback (most recent call last):
  18.   File "<pyshell#4>", line 1, in <module>
  19.     import beautifulsoup4
  20. ModuleNotFoundError: No module named 'beautifulsoup4'
  21. >>>
复制代码

跪求大佬解答
最佳答案
2021-8-16 18:21:23
  1. 一、安装

  2. pip install beautifulsoup4  


  3. 二、导入

  4. form bs4 import BeautifulSoup
复制代码


https://blog.csdn.net/weixin_43930694/article/details/90142678
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2021-8-16 18:10:45 | 显示全部楼层
注意看第一个代码的第19行
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2021-8-16 18:21:23 | 显示全部楼层    本楼为最佳答案   
  1. 一、安装

  2. pip install beautifulsoup4  


  3. 二、导入

  4. form bs4 import BeautifulSoup
复制代码


https://blog.csdn.net/weixin_43930694/article/details/90142678
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2021-8-16 18:27:26 | 显示全部楼层
是 import bs4
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2021-8-16 19:21:45 | 显示全部楼层
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-6-20 03:41

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表