I had the same problem: script with import colorama was throwing an ImportError, but sudo pip install colorama was telling me "package already installed".

My fix: run pip without sudo: pip install colorama. Then pip agreed it needed to be installed, installed it, and my script ran.

Or even better, use python -m pip install <package> (or python3 or python3.6 or even the full path). The benefit of this is, since you are executing the specific version of python that you want the package in, pip will unequivocally install the package into the "right" python. Again, don't use sudo in this case... then you get the package in the right place, but possibly with (unwanted) root permissions.

My environment is Ubuntu 14.04 32-bit; I think I saw this before and after I activated my virtualenv.

Answer from Dan H on Stack Overflow
🌐
Python.org
discuss.python.org › python help
Module not found but it's already installed - Python Help - Discussions on Python.org
March 26, 2024 - I’m fairly new to Python. I use Python 3.11.8 (what MS Azure supports, my eventual production environment) on Windows 10. I’m testing a program on Windows 10. I have created and activated my virtual environment in the cmd.exe window. My program is in c:\users\MYUSER\onedrive - ...
🌐
Reddit
reddit.com › r/learnpython › python can't find module, even after pip install
r/learnpython on Reddit: Python can't find module, even after pip install
July 27, 2021 -

I'm trying to import/use an ETL package, PETL, with
import petl as etl

I did

pip install petl
from my project's root library; it appeared to install fine but VSCode is telling me it can't find the module; and when I try to run it from the terminal there it gives syntax error

I'm using python 3.7; I don't think I have multiple versions of python installed, but not sure how to check that
this seems to be a relatively common problem; a quick google answer says it's not looking where pip installed it
6 months ago I installed pymssql, am using that in the same script, and am able to find that fine (I'm just now getting back into a small python project)

🌐
Python.org
discuss.python.org › python help
Python doesn't find local module although it is installed and its location exists in sys.path - Python Help - Discussions on Python.org
March 23, 2023 - I installed a local module using ... the module seems to be locally installed, I am unable to invoke it from outside the project directory. I have spent about two hours trying out various things, reading forums, watching videos, etc. to understand my mistake, but I have not found ...
🌐
Quora
quora.com › Why-am-I-facing-the-no-module-found-issue-when-I-have-already-installed-that-on-my-Python
Why am I facing the “no module found” issue when I have already installed that on my Python? - Quora
Answer: There are few reasons why it might happen: 1. Environment Setup - Virtual env or separate environment - You would need to activate the environment where you have installed the module. 2. The module might not be installed correctly - using correct package manager like PIP/CONDA etc 3. Mod...
🌐
Reddit
reddit.com › r/pythonhelp › python module not found but its installed?
Python module not found but its installed? : r/pythonhelp
June 23, 2022 - Try doing python3 -m pip install paramiko to ensure you're installing for the right Python.
🌐
GeeksforGeeks
geeksforgeeks.org › python › how-to-fix-the-module-not-found-error
How to Fix The Module Not Found Error - Python
July 1, 2026 - Explanation: package may be installed globally or in another virtual environment, but not in the currently active one. 1. Check Whether the Module is Installed: You can use a try-except block to verify whether a module exists.
Find elsewhere
🌐
Stack Overflow
stackoverflow.com › questions › 15052206 › python-pip-install-module-is-not-found-how-to-link-python-to-pip-location
Python pip install module is not found. How to link python to pip location? - Stack Overflow
I'm a newbie and I needed the pySerial and feedparser module for my projects. I'm running Mountain lion. I followed the following tutorial so that I could upgrade to python 2.7.3 and then use the ...
🌐
freeCodeCamp
freecodecamp.org › news › module-not-found-error-in-python-solved
ModuleNotFoundError: no module named Python Error [Fixed]
September 12, 2022 - The following code will throw a module not found error: ... The reason for this is that we have used the wrong path to access the test1 module. The right path should be demoA.test1. When you correct that, the code works: ... For resolving an imported module, Python checks places like the inbuilt library, installed modules, and modules in the current project.
🌐
GeeksforGeeks
geeksforgeeks.org › how-to-fix-the-module-not-found-error
How to Fix The Module Not Found Error? - GeeksforGeeks
April 28, 2025 - This error indicates that Python couldn't find the 'mymodule' module in any of the directories it searched. Check if the imported modules are installed or not
🌐
Medium
carlkho-cvk.medium.com › why-is-my-python-module-not-found-in-my-virtual-environment-779c37cd2d2c
Why is My Python Module Not Found in My Virtual Environment? | by Carl Kho | Medium
October 3, 2024 - This is especially common when using tools like Homebrew (Macbook folks raise your hands 🙌), which can sometimes override your system’s default Python. Once you’ve confirmed the problem, the fix is straightforward: Activate your venv The easiest way is to open your project in VS Code, locate the activate script within your venv’s bin directory (e.g., ./my_venv/bin/activate), and drag it directly into your terminal. Then, hit enter. This executes the script and properly activates your environment. (Re)install your packages Now that your venv is active, use pip to install or reinstall the necessary packages.
🌐
YouTube
youtube.com › watch
Python 3 .9 ModuleNotFoundError Fix (Windows10) - YouTube
Installing Third-Party Modules on PythonThis video Fixes The Modulenotfounderror for python 3.9 and older versionsFOLLOW:------------------------------------...
Published: October 22, 2020
🌐
FreeBSD
forums.freebsd.org › development › userland programming and scripting
Why do I get "Module not found" after python installation in venv? | The FreeBSD Forums
November 9, 2022 - The example is not using Python as a demonstration, it will take some thinking to connect the dots there. Jails improve on the concept of the traditional chroot environment in several ways · docs.freebsd.org But basically, to solve OP's problem, I think OP just needs to be · still inside the jail when running the pip install command.
🌐
Saturn Cloud
saturncloud.io › blog › jupyter-notebook-module-not-found-even-after-pip-install
Jupyter Notebook: Module Not Found Even After Pip Install | Saturn Cloud Blog
May 1, 2026 - Here are some tips for fixing the “Module not found” error in Jupyter Notebook: Make sure you’re running Jupyter Notebook in the correct environment where you installed the required module. If you’re using Anaconda, make sure you’re in the correct conda environment. If you’re using virtual environments, activate the correct environment before running Jupyter Notebook. Verify that you’re running Jupyter Notebook with the correct version of Python that the module requires.
🌐
iO Flood
ioflood.com › blog › python-no-module-named
[SOLVED] 'No Module Named' Python Error Solutions
January 30, 2024 - Once installed, you should be able to import it in your Python code without the ‘No Module Named’ error. If the module is installed but you’re still getting the error, it could be that Python is looking in the wrong place for your module.
🌐
Python.org
discuss.python.org › python help
[SOLVED] Module installed but cannot import - Python Help - Discussions on Python.org
September 20, 2023 - Hi everyone, I’m extremely new to all of this. I went and installed Rich via pip and added the line from rich import pretty but I’m getting the error 'no module named ‘rich’. My module is located in \venv\Lib\site-packages\pip_vendor\rich\pretty.py I also ran pip --version and this is my output: pip 23.2.1 from C:\Users \AppData\Local\Programs\Python\Python311\Lib\site-packages\pip (python 3.11) I’ve tried reinstalling, restarting python, checking pip list to see if it’s instal...