问题产生
在进行爬虫抓取时,需要安装第三方模块库BeautifulSoup。
探索过程
尝试使用pip install BeautifulSoup
问题一:
SyntaxError: Missing parentheses in call to ‘print’. Did you mean print(int “Unit tests have failed!”)?
方法一:
进入官网下载安装包https://files.pythonhosted.org/packages/1e/ee/295988deca1a5a7accd783d0dfe14524867e31abb05b6c0eeceee49c759d/BeautifulSoup-3.2.1.tar.gz
解压后再次键入:python install setup.py
PS使用wheel安装包时:pip install **.whl
但依旧发现安装失败。
此时在源代码文件setup.py:阅读后发现其print未使用函数
from distutils.core import setup
import u