How is 618 sales champion made?Uncover the secret of e-commerce’s “invigorating” hundreds of millions of sales data>>>
Preface: in my graduation thesis, I plan to use Python as a crawler to crawl some data, and I started to learn Python recently
I encountered a problem in my study. I installed Python according to the article I read, configured the corresponding environment (using the window system), and used the pychar editor to write python (this software is very convenient to run python, and the library needed to install Python is also very simple)
After installing the two libraries of requests and beautifulsoup, we start to crawl a local HTML. At the beginning, we refer to from BS4 import beautifulsoup, but at the end, we always report importerror: no module named BS4 error
After checking some information, the problem was solved successfully
Solution:
The runtime prompts importerror: no module named BS4
error, which means that the module named beautifulsoup4 was not found
Write about how Python installs modules:
1. Download BS4 module:
http://www.crummy.com/software/BeautifulSoup/bs4/download/4.3/beautifulsoup4-4.3.2.tar.gz
2. Unzip to the root directory under the python installation directory:
3. Run CMD and enter the directory after decompression (if Python is installed on Disk C by default, after opening CMD, you can use CD… Statement to return to the root directory first, and then enter into python27/beautiful soup4-4.3.2)
4. Install BS4 module after entering python27/beautiful soup4-4.3.2
After installation, it can be used;
Similar Posts:
- Importerror: no module named BS4 error resolution
- ImportError: No module named ‘requests’
- How to Solve Beautifulsoup Error: “No module named ‘bs4’.” [from bs4 import BeautifulSoup]
- After installing BS4 in Python, pychar still reports module not found error: no module named ‘BS4’
- modulenotfounderror: no module named ‘cv2’ [How to Solve]
- Importerror: no module named yaml solution [How to Solve]
- How to Solve Centos Yum Error: No module named yum
- ImportError: No module named pkg_resources [How to Solve]
- Python ImportError: No module named win32com.client [How to Solve]
- [Solved] Centos6: Python 2.6 upgrade to 3.7, error handling [no module named ‘_ctypes’]