Ubuntu - How to install a Python module (BeautifulSoup) on Python 3.3 instead of Python 2.7?

前端 未结 5 1429
春和景丽
春和景丽 2021-02-07 14:36

I have this code (as written in BS4 documentaion):

  from bs4 import BeautifulSoup

When I run the script (using python3) I get the error:

5条回答
  •  情深已故
    2021-02-07 15:01

    I had the same problem, but when I tried to "sudo apt-get install'python3-bs4" it said it was already installed. I ran my program with "python3 program.py" and it worked just fine.

提交回复
热议问题