[python]运行脚本报错:ModuleNotFoundError: No module named 'bs4'
[python]运行脚本报错:ModuleNotFoundError: No module named 'bs4'
>python main.py
Traceback (most recent call last):
File "main.py", line 3, in <module>
from bs4 import BeautifulSoup
ModuleNotFoundError: No module named 'bs4'
>pip install bs4 // 安装指令
Collecting bs4
Downloading bs4-0.0.1.tar.gz (1.1 kB)
Collecting beautifulsoup4
Downloading beautifulsoup4-4.11.2-py3-none-any.whl (129 kB)
|████████████████████████████████| 129 kB 13 kB/s
Collecting soupsieve>1.2
Downloading soupsieve-2.4-py3-none-any.whl (37 kB)
Using legacy setup.py install for bs4, since package 'wheel' is not installed.
Installing collected packages: soupsieve, beautifulsoup4, bs4
Running setup.py install for bs4 ... done
Successfully installed beautifulsoup4-4.11.2 bs4-0.0.1 soupsieve-2.4 // 安装完成
WARNING: You are using pip version 20.1.1; however, version 23.0.1 is available.
You should consider upgrading via the 'd:\6.commontools\python379\python.exe -m pip install --upgrade pip' command.