In this tutorial, we will help you to solve the modulenotfounderror no module named absl error you encountered.
The error occurs if the Python library cannot find the “absl-py” module installed or maybe its installed it in an incorrect path environment.
Why the modulenotfounderror no module named absl occur?
The no module named absl occur because you use the ‘absl’ package along with not installing in python library.
Also read: Modulenotfounderror: no module named ‘httpx’
Other cause of error
The error ModuleNotFoundError: No module named ‘absl’ appers for several reasons:
- The absl-py module is not installed through executing the pip install absl-py.
- Installing the absl-py module in a various version of python than the one you’re using.
- Installing the module globally and not in the incorrect virtual environment.
- You run the IDE in an incorrect Python version.
- Maybe you name module absl.py that’s why it cause a duplicate in the official package.
- Maybe you declare a variable named absl, so that’s why it cause shadow to the duplicate variable.
How to solve the no module named absl?
To solve the no module named absl we will provide the solutions below for the Windows Platform, Anaconda, and Jupyter Notebook.
Time needed: 3 minutes
Here are the solutions to solve the error no module named absl.
- Solutions 1: Install absl-py in Python 2
The following command below is the command to install the absl-py module in Python 2.
pip install absl-py
After you execute the command above, it will show like this:
- Solutions 2: Install absl-py in Python 3
The following command below is the command to install the absl-py module in Python 3.
pip3 install absl-py
After you run the command above, it will show like this:
- Solution 3: Install absl-py in py alias
The following command below is the command to install the absl-py module in py alias.
py -m pip install absl-py
After you run the command above, it will show like this:
- Solution 4: Install absl-py in Anaconda
The following command below is the command to install the absl-py module in Anaconda.
py -m pip install absl-py
After you run the command above, it will show like this:
- Solution 4: Install absl-py in Jupyter Notebook
The following command below is the command to install the absl-py module in Anaconda.
!pip install absl-py
Check if the absl Module is Installed
You can check the absl module if it is installed through executing the command:
pip show absl-py
If the command above is executed it will show the package which is either it is installed or not.
if it is installed the system will show the details about the package.
Which are include the name, version, location, author, license and the summary.
Let’s have the example below:

Frequently Asked Questions
What is Python ModuleNotFoundError and what causes it?
ModuleNotFoundError (a subclass of ImportError) is raised when Python cannot find the module you tried to import. Common causes: the package isn’t installed (pip install missing), wrong virtual environment activated, typo in module name, or Python can’t find your local module on the import path. The error message names exactly which module is missing.
How do I fix ‘ModuleNotFoundError: No module named X’?
Run pip install X first. If that succeeds but you still get the error, check which Python you’re using (which python OR python –version) vs which pip (which pip OR pip –version), they must match. Common gotcha: pip points to system Python 3.9 but you’re running python3.11 in a venv. Inside the venv, use python -m pip install X to be sure pip matches the active Python.
Why does my code work in one environment but not another?
Different Python versions or different installed packages. To diagnose: pip freeze > requirements.txt on the working environment, then pip install -r requirements.txt on the broken one. Use virtualenv (python -m venv venv) or conda for every project to avoid system-wide package collisions.
Is ModuleNotFoundError the same as ImportError?
ModuleNotFoundError is a subclass of ImportError added in Python 3.6. It specifically means ‘no such module exists.’ Plain ImportError covers a wider set: module exists but a name inside it can’t be imported (e.g. ‘cannot import name X from Y’). except ImportError catches both; except ModuleNotFoundError catches only the missing-module case.
Where can I find more ModuleNotFoundError fixes?
Browse the ModuleNotFoundError reference hub for 198+ specific module fixes (TensorFlow, Flask, Django, pandas, numpy, etc.). For related issues see ImportError. For broader Python setup see Python Tutorial hub.
Conclusion
To conclude, we discuss the solutions to the error no module named ‘absl’ in windows platform, anaconda, and Jupyter Notebook.
I hope this tutorial can help you to solve the error you encountered.




