I have Python 2.7 and Python 3.5 installed. When I pip install beautifulsoup4report that it is already installed in the python2.7 / site-package directory.
pip install beautifulsoup4
But how do I install it in a python3 directory?
I think pip3 will satisfy your needs, use the following command on the terminal:
pip3 install beautifulsoup4
See doc
Run as root:
apt-get install python3-bs4 #or pip3 install beautifulsoup4
Then import it as follows:
import bs4
bs4 :
python -m pip install bs4
Debian Ubuntu Linux, Beautiful Soup :
$ apt-get install python-bs4 (for Python 2) $ apt-get install python3-bs4 (for Python 3)
After installation, import the library
from bs4 import BeautifulSoup
Source: https://habr.com/ru/post/1622056/More articles:Приложение зависает во время 'compileCoffeescript' - javascriptcomparing HTML text content with jQuery - javascriptCheck if there was any replacement made by `perl -i -pe` - bashUnsatisfiedLinkError: получение этой ошибки в проекте Telegram - javaAliasMatch in httpd.conf with django admin - djangoGoogle login error with youtube accounts - javascriptJava shows wrong current year - javaJavaScript asynchronous error - javascriptNull pointer to service in REST using jersey and spring - javaBuilding a multidimensional array from other arrays - javascriptAll Articles