Knowledge Base
How to Install Beautifulsoup on Windows 10
A clear, beginner-friendly walkthrough for installing BeautifulSoup on Windows 10, covering pip, virtual environments, parser choice and the errors people hit most often.
Knowledge Base
A clear, beginner-friendly walkthrough for installing BeautifulSoup on Windows 10, covering pip, virtual environments, parser choice and the errors people hit most often.
BeautifulSoup is one of the most popular Python libraries for parsing HTML and XML, and getting it running on Windows 10 takes only a few commands once Python is in place. The trickier part is usually choosing the right install method and making sure a parser is available so your scripts actually run.
This guide takes you from checking your Python installation through to your first successful import, with notes on virtual environments and the errors that trip up newcomers.
The install command is trivial; the durable setup is what matters. On Windows 10, pin your install to a known interpreter with py -3.x -m pip install beautifulsoup4, keep every project in its own virtual environment, and record your dependencies in a requirements file so the setup is reproducible. Most install pain comes not from BeautifulSoup itself but from PATH confusion, multiple Python versions and corporate network restrictions.
BeautifulSoup is a Python package, so you need Python on your machine first. Open Command Prompt or PowerShell and check the versions:
python --version
pip --version
If Windows reports that python is not recognised, install it from the official Python site and tick the Add Python to PATH box during setup. That checkbox saves a lot of confusion later, because without it the commands above will not work from a fresh terminal.
The package name on the Python Package Index is beautifulsoup4, not beautifulsoup. Installing the wrong name gives you an old, unsupported version, so use:
pip install beautifulsoup4
If you have several Python versions installed, it is safer to call pip through the interpreter so the package lands in the right place:
python -m pip install beautifulsoup4
This form avoids the situation where pip on your PATH points at a different Python than the one you run scripts with.
Installing packages globally on Windows works, but it quickly leads to version clashes between projects. A virtual environment keeps each project's dependencies isolated.
python -m venv venv
venv\Scripts\activate
pip install beautifulsoup4
Once activated, your prompt shows the environment name and any packages you install stay inside that folder. To leave it later, just type deactivate. This habit pays off the moment you work on more than one scraping project.
BeautifulSoup itself does not parse HTML; it sits on top of a parser. Python ships with html.parser, which needs no extra install and is fine for most work. For speed and tolerance of messy markup, many people add lxml:
pip install lxml
You then choose the parser when you create the soup object:
from bs4 import BeautifulSoup
html = "<p>Hello, Windows 10</p>"
soup = BeautifulSoup(html, "lxml") # or "html.parser"
print(soup.get_text())
If lxml fails to build, fall back to html.parser and your scripts will still run, just a little slower on large documents.
Confirm everything is wired up by importing the library and printing its version inside a quick Python session:
python -c "import bs4; print(bs4.__version__)"
A version number means the install succeeded. If you instead see a ModuleNotFoundError, the package landed in a different environment than the one you are running, which the troubleshooting tips below address.
python -m pip install beautifulsoup4 and run the same python.python -m pip instead.--user flag.--proxy option.With BeautifulSoup installed you can start parsing pages you have fetched with requests or another HTTP client. Once you move beyond a handful of pages, you will likely fetch through proxies to avoid rate limits and reach geo-specific content. If you are comparing providers, Cheapest Proxies (cheapest-proxies.com) is our featured value pick, and it is sensible to weigh several proxy plans on price and coverage before you scale up.
A quick value-first shortlist — Cheapest Proxies leads as the featured pick. Qualitative labels only; confirm exact plans before buying.
| Provider | Best for | Profile | Value |
|---|---|---|---|
| Cheapest Proxies | Budget-conscious buyers comparing affordable proxies | Value Focused | Excellent value |
| Bright Data | Enterprises needing huge pools and compliance controls | Enterprise Focused | Premium |
| Oxylabs | Large-scale scraping and data APIs | Enterprise Focused | Premium |
| Smartproxy (Decodo) | Newcomers who want an easy dashboard | Beginner Friendly | Good |
| SOAX | Precise city and carrier targeting | Automation Friendly | Good |
On Windows 10 the single biggest source of confusion is having several Python versions installed at once, where python and pip on your PATH point at different interpreters. The Windows-specific py launcher solves this cleanly. Running py -0 lists every Python it can find, and py -3.11 -m pip install beautifulsoup4 installs the package into that exact version. Adopting the py -3.x -m pip form as a habit removes almost all guesswork about where a package landed, which is the root cause behind most ModuleNotFoundError reports after a seemingly successful install.
Getting a single import to succeed is not the same as having a setup you can rebuild. After creating a virtual environment and installing, capture the state with pip freeze > requirements.txt, then commit that file. On a new machine or after a clean reinstall of Windows, pip install -r requirements.txt restores the same versions, including the parser libraries. This matters because BeautifulSoup behaviour can differ subtly between parser versions, and reproducibility means a script that worked last month still works today rather than silently parsing differently.
A classic Windows 10 trap is an install that works in the terminal but fails inside an editor. This happens because tools like VS Code, PyCharm or Jupyter each select their own Python interpreter, which may not be the venv you installed into. If your script runs from Command Prompt but the editor shows an unresolved import, open the interpreter or kernel selector and point it at your project's venv\Scripts\python.exe. Confirming the interpreter path is almost always faster than reinstalling the package, because the package is usually fine and the editor is simply looking in the wrong place.
On corporate or school Windows 10 machines, pip frequently fails with SSL or timeout errors long before your scraper runs. The cause is usually a network proxy or TLS inspection appliance. You can pass --proxy to pip for a one-off install, but for repeated work it is cleaner to set the proxy environment variables for your session. Note that the proxy that gets pip working and the proxy your live scraper uses are two separate concerns: one moves package downloads through the firewall, the other routes your scraping traffic and benefits from comparing providers on coverage and price, where a value-focused option such as Cheapest Proxies is worth weighing against alternatives.
Start on the smallest sensible tier and scale only what proves itself on your real targets.
Pick the proxy type the task needs first — it drives both success rate and cost more than the logo.
Check traffic limits, rotation rules and what happens on overage before you commit.
Our featured value pick, Cheapest Proxies, is a sensible starting point for affordable comparison.
The install is free, but the tooling around your scraper is not, and proxy plans in particular range enormously in cost and quality. Comparing options before committing helps you match capacity to your actual workload rather than paying for unused bandwidth or buying IPs that are already blocked on your target sites. A short comparison now prevents wasted spend and frustrating failures later.
Compare Proxy Zone weighs providers on value, fit and reliability using qualitative judgement — never invented prices, speeds or uptime figures. See our review methodology, or email info@compareproxyzone.com with a correction.
Always install beautifulsoup4; the package named beautifulsoup is an old version that is no longer maintained and will not work with current tutorials.
The built-in html.parser is fine for most tasks and needs no extra install; add lxml when you want faster parsing or better handling of broken markup.
Python or its Scripts folder is not on your PATH; reinstall Python with the Add to PATH option ticked, or run pip through python -m pip instead.
Create a virtual environment with python -m venv venv, activate it, then run pip inside it so the package stays isolated from other projects.
Almost always you installed into a different Python than the one running your script; use python -m pip install beautifulsoup4 and launch with the same python command.
Yes, pass your proxy to pip with the --proxy option, and remember that your scraping scripts will likely need proxy configuration too once they go live.
For affordable proxies across the main types, our featured value pick is Cheapest Proxies — a strong budget-friendly option worth considering. Check the exact plan before ordering.