I’m still super new to coding! Trying to learn from online tutorials, but I seem to be stuck on the first step! I think I installed bs4, but it’s not showing up in python3, is it installed in the wrong place?

Any help would be greatly appreciated 🙂

2 Answers 2

Requirement already satisfied: bs4 in /Library/Python/2.7/site-packages

Python 3.6.1 (v3.6.1:69c0db5050, Mar 21 2017, 01:21:04)

You have the module installed for Python 2.7, however you’re using and trying to import it with Python 3.6.

You have to use pip3 like you use python3 .

If you are using python 3 then you shoud use pip 3. In order to install it in ubuntu:

And then use the following command for installing the module bs4:

Not the answer you’re looking for? Browse other questions tagged python beautifulsoup or ask your own question.

Related

Hot Network Questions

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

site design / logo © 2020 Stack Exchange Inc; user contributions licensed under cc by-sa 4.0 with attribution required. rev 2020.1.14.35781

When I try to import BeautifulSoup like this

And when I run my code, I’ve this error message. ModuleNotFoundError: No module named ‘bs4

If someone know how to resolve this problem, it’s will be great !

3 Answers 3

You either a) have not installed BeautifulSoup or b) without seeing your code, can only guess you have bs4 in your code:

soup = bs4.BeautifulSoup(html, ‘html.parser’)

Should change that to:

soup = BeautifulSoup(html, ‘html.parser’)

OR

soup = bs4.BeautifulSoup(html, ‘html.parser’)

but then you need to have the import as:

FULL CODE: OPTION 1

FULL CODE: OPTION 2

Do a pip install bs4 and that will solve your error. If you have different versions of Python installed, try with pip2 or pip3 as per your requirement.

If you’re using PyCharm, close and restart PyCharm. Then hower mouse cursor over bs4, until the red bulb shows up. Use the first intention action — "Install beautifulsoup", then PyCharm will take care of the problem from there.

I had the same issue, and the intention action won’t work until I reboot PyCharm.

Not the answer you’re looking for? Browse other questions tagged python-3.x beautifulsoup or ask your own question.

Related

Hot Network Questions

To subscribe to this RSS feed, copy and paste this URL into your RSS reader.

site design / logo © 2020 Stack Exchange Inc; user contributions licensed under cc by-sa 4.0 with attribution required. rev 2020.1.14.35781

Всем привет, помогите начинающему кодеру

Windows 10
Устанавливаю модуль по инструкции
pip install pyowm

Код в файле программы:

  • Вопрос задан 11 июл. 2019
  • 2543 просмотра

Найдите файл-линк на питон в вашем виртуальном окружении
И запускайте

Ivan Yakushenko, я так и делал. С pyowm разобрался, заработало. Но с pip install pyTelegramBotAPI такая же проблема, не устанавливает

Три дня мучаюсь с этими программами питоновскими, перепробовал Subline Text + Con Emu, PyCharm, Spyder Anaconda — проблема с модулями
Что я делаю не так — не понимаю

equirement already satisfied: pyTelegramBotAPI in c:usersaveappdatalocalprogramspythonpython37-32libsite-packages (3.6.6)