python-3.7.1-amd64 是python3的安装文件;
C:\Python\Python37
目录下存放beautifulsoup4-4.6.3解压包
beautifulsoup4-4.6.3.tar 安装文件-是python的一个网络爬虫库 ;
C:\Users\lenovo>python
Python 3.7.1 (v3.7.1:260ec2c36a, Oct 20 2018, 14:57:15) [MSC v.1915 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
exit()
C:\Users\lenovo>pip install beautifulsoup4 #或输入beautifulsoup4-4.6.3
安装bs4时报警提示:
Collecting beautifulsoup4
Downloading https://files.pythonhosted.org/packages/21/0a/47fdf541c97fd9b6a610cb5fd518175308a7cc60569962e776ac52420387/beautifulsoup4-4.6.3-py3-none-any.whl (90kB)
100% |████████████████████████████████| 92kB 22kB/s
Installing collected packages: beautifulsoup4
Successfully installed beautifulsoup4-4.6.3
You are using pip version 10.0.1, however version 18.1 is available.
You should consider upgrading via the ‘python -m pip install --upgrade pip’ command.
解决方法:根据提示升级pip输入“python-m pip install --upgrade pip”
C:\Users\lenovo>python -m pip install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl (1.3MB)
100% |████████████████████████████████| 1.3MB 590kB/s
Installing collected packages: pip
Found existing installation: pip 10.0.1
Uninstalling pip-10.0.1:
Successfully uninstalled pip-10.0.1
Successfully installed pip-18.1
问题解决。
当Pycharm运行bs4时报警:
module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named ‘bs4’
解决方法:不复述见
https://blog.csdn.net/sinat_34937826/article/details/79992728