Search code examples
pythonubuntupip

Can't install command-not-found on pip


I wanna install the pip package command-not-found which is defined in my requirements.txt like this: command-not-found==0.3 on my Ubuntu machine but i get this error:

ERROR: No matching distribution found for command-not-found==0.3

I heard that there is an apt package python-commandnotfound but i can't install that too

E: Unable to locate package python-commandnotfound

I also tried apt search with an apt update but both returned nothing. I also am getting the same error in my GitHub Actions and at work


Solution

  • I found the problem actually it was a pretty stupid mistake 😅
    The issue was that i was creating the requirements.txt but forgot to activate my venv.

    Thank you for the suggestions tho 👍

    So always use a venv people 🫠