平常都是通过IDEA提示导包的,这次却发现BeautifulSoup导不成功,并提示

SyntaxError: Missing parentheses in call to 'print'. Did you mean print(int "Unit tests have failed!...

上网搜索尝试一番,都是不符合的,最终发现,在 项目包 管理界面导入才生效,以下是过程:

File --> Settings(ctrl+alt+s) ->Project:(项目名) -> Project Interpreter。如下图所示:

pycharm下通过提示BeautifulSoup导入失败解决方式

点击“+”,输入Beautifulsoup ,就可以找到你要安装的插件了。

注意:Python2的选择BeautifulSoup进行安装,Python3的选择bs4进行安装。

相关文章:

  • 2022-12-23
  • 2021-10-07
  • 2021-12-10
  • 2021-04-25
  • 2021-04-16
  • 2021-09-20
  • 2022-01-12
  • 2021-08-28
猜你喜欢
  • 2021-05-10
  • 2021-06-20
  • 2021-07-24
  • 2021-10-31
  • 2022-12-23
  • 2021-09-24
  • 2021-09-11
相关资源
相似解决方案