无法安装bs4请求帮助:多种pip命令尝试均失败
bs4安装失败的解决办法
- 注意:bs4的官方包名是
beautifulsoup4,不是大写的BS4,先试试正确的安装命令:pip install beautifulsoup4 - 如果你系统里同时装了Python2和Python3,要指定对应版本的pip:
pip3 install beautifulsoup4 - 遇到权限报错时,添加
--user参数安装到用户目录:pip3 install beautifulsoup4 --user - 用Python内置模块调用pip,避免环境变量问题:
python3 -m pip install beautifulsoup4 - 网络不畅的话,换国内PyPI镜像源加速安装:
pip3 install beautifulsoup4 -i https://pypi.tuna.tsinghua.edu.cn/simple
内容的提问来源于stack exchange,提问作者Kadir Bağdatlı
相关产品推荐
相关产品推荐

