How to Install charset-normalizer in Python
The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.
pip install charset-normalizer
What is charset-normalizer?
The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet.
> A library that helps you read text from an unknown charset encoding. Motivated by , > I'm trying to resolve the issue by taking a new approach. > All IANA character set names for which the Python core library provides codecs are supported. > You can also register your own set of codecs, and yes, it would work as-is.
>>>>> 👉 Try Me Online Now, Then Adopt Me 👈
This project offers you an alternative to Universal Charset Encoding Detector, also known as Chardet.
Quick Start
Minimal example to get started with charset-normalizer:
import charset_normalizer
print(charset_normalizer.__version__)
Installation
pip (standard)
pip install charset-normalizer
Virtual environment (recommended)
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install charset-normalizer
pip3
pip3 install charset-normalizer
conda
conda install -c conda-forge charset-normalizer
Poetry
poetry add charset-normalizer
Verify the Installation
After installing, confirm the package is available:
python -c "import charset_normalizer; print(charset_normalizer.__version__)"
If this prints a version number, installation succeeded. If you see a ModuleNotFoundError, see the errors section below.
Installation Errors
Common errors when installing charset-normalizer with pip.
ModuleNotFoundError: No module named 'charset_normalizer'
Cause: The package is not installed in the current Python environment.
Fix: Run pip install charset-normalizer. If using a virtual environment, ensure it is activated first.
ModuleNotFoundError: No module named 'charset_normalizer' (installed but still failing)
Cause: pip installed the package into a different Python than the one running your script.
Fix: Use python -m pip install charset-normalizer to install into the interpreter you are running.
ImportError: cannot import name 'X' from 'charset_normalizer'
Cause: The function or class does not exist in the installed version.
Fix: Check the version with pip show charset-normalizer and upgrade with pip install --upgrade charset-normalizer.
pip: command not found
Cause: pip is not in PATH or Python was not added to PATH during installation.
Fix: Try python -m pip install charset-normalizer. On macOS/Linux try pip3.
PermissionError: [Errno 13] Permission denied
Cause: No write access to the system Python package directory.
Fix: Use a virtual environment, or add --user: pip install --user charset-normalizer
SSL: CERTIFICATE_VERIFY_FAILED
Cause: pip cannot verify PyPI's SSL certificate — common behind corporate proxies.
Fix: Try: pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org charset-normalizer
Recent Releases
| Version | Released |
|---|---|
3.4.7 latest |
2026-04-02 |
3.4.6 |
2026-03-15 |
3.4.5 |
2026-03-06 |
3.4.4 |
2025-10-14 |
3.4.3 |
2025-08-09 |
Manage charset-normalizer
Upgrade to latest version
pip install --upgrade charset-normalizer
Install a specific version
pip install charset-normalizer==3.4.7
Uninstall
pip uninstall charset-normalizer
Check what is installed
pip show charset-normalizer