Answer the question
In order to leave comments, you need to log in
Cannot import name 'BeautifulSoup' from 'bs4'?
Why can't I import the library?...
Python 3.7.2, CentOS 7
#python3.7 -i
>>> from gtts import gTTS
Traceback (most recent call last): File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/gtts/__init__.py", line 3, in <module> from .tts import gTTS, gTTSError
File "/usr/local/lib/python3.7/site-packages/gtts/tts.py", line 4, in <module> from gtts.lang import tts_langs
File "/usr/local/lib/python3.7/site-packages/gtts/lang.py", line 2, in <module> from bs4 import BeautifulSoup
ImportError: cannot import name 'BeautifulSoup' from 'bs4' (/usr/local/lib/python3.7/site-packages/bs4/__init__.py)
pip3 list
Package Version
---------------- --------
beautifulsoup4 4.7.1
bs4 0.0.1
certifi 2019.3.9
chardet 3.0.4
Click 7.0
Flask 1.0.2
googletrans 2.4.0
gTTS 2.0.3
gTTS-token 1.1.3
idna 2.8
itsdangerous 1.1.0
Jinja2 2.10.1
MarkupSafe 1.1.1
pip 19.0.3
PySocks 1.6.8
pyTelegramBotAPI 3.6.6
requests 2.21.0
setuptools 41.0.0
six 1.12.0
soupsieve 1.9.1
style 1.1.6
urllib3 1.24.1
Werkzeug 0.15.2
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question