Cannot install BeautifulSoup for python 3.6

I spent the last 45 minutes hopelessly trying to run:

from bs4 import BeautifulSoup

But to no avail. I tried the commands:

python -m pip install beautifulsoup4

where it says:

Requirement already satisfied: beautifulsoup4 in c:\python27\lib\site-packages

I tried:

pip3 install beautifulsoup4

where he says the same thing.

I tried:

pip install beautifulsoup4

Same.

I looked through the whole stackoverflow, youtube, I make myself crazy trying to figure it out. I do not know what to do, please help me.

When I try to run my main.py program with the following code:

from bs4 import BeautifulSoup

With py -3 main.py, I get an error:

ModuleNotFoundError: No module named 'bs4'

Please, please, please help me.

I tried the method suggested in BeautifulSoup4 cannot be installed in python3.5 on Windows7 , but to no avail.

+6
source share
5 answers

python3.6.

python3.6 -m pip install beautifulsoup4
+6

Python 3.6 beautifulsoup4. , webcrawl.

beautifulsoup4 .

from bs4 import BeautifulSoup
+3

: https://anaconda.org/ ( , )

Python 100 -. , (300 ).

+1

, BeautifulSoup4. , . , .

python

cd C:\Users\User\AppData\Local\Programs\Python\Python36-32\Scripts

pip3 install BeautifulSoup4

-,

Collecting BeautifulSoup4
 Downloading beautifulsoup4-4.6.0-py3-none-any.whl (86kB)
   100% |████████████████████████████████| 92kB 6.7kB/s
Installing collected packages: BeautifulSoup4
Successfully installed BeautifulSoup4-4.6.0

, .

+1

The problem is that installing beautifulsoup4 and currently on Python 3.6 does not support multiple libraries.

You have two options. You can use a virtual environment like Anaconda or virtualenv, as Alan suggested. Here you create an environment and set the python version to 3.5

Another option is to remove python 3.6 and install 3.5 and then beautifulsoup4

-1
source

Source: https://habr.com/ru/post/1017064/


All Articles