Skip to content

Cannot see lxml parser for Beautiful Soup, even after pip install #1299

Discussion options

You must be logged in to vote

This is a known issue.

Solution:

  1. Restart Docker container:
docker-compose down
docker-compose up -d
  1. Install both Python modules before running an import on bs4.

For example:

import os
os.system("pip install bs4 lxml")
import bs4
print(bs4.builder.builder_registry.builders)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by rachelmbrubaker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
1 participant