ModuleNotFoundError: No module named 'termcolor'

Viewed 626

I know this problem has been posted a thousand times but i feel like everything is fine in my project and environment (as my code was working for a week and suddenly without changes to it, it stopped working on these errors)

Can someone tell me what's wrong and how to fix it please? Re-installing packages doesn't work.

Using python 3.6.6

Code:

#Imports
import sys
import pandas as pd
import pyodbc
import datetime
from termcolor import colored
import openpyxl as xl
from colored import fg, bg, attr

Placing another import termcolor for example doesn't change anything.

Python version and interpreter match

Pip installed list

3 Answers

Don't use "from" Use only "import termcolor"

Termcolor, if I am not mistaken, needs the command prompt pip install termcolor.

Hope this works!

make sure you are using the correct interpreter that termcolor was installed with.

Related