No module named 'fpdf'

Hello everyone,
I wish to create a pdf file using python using füdf module and one error always pops up when I run my script. The error displays as "No module name ‘fpdf’ "
I have installed the module fpdf using pip through command prompt and even then the console keeps showing the same error. I am using Spyder as IDE
Should I use a different IDE? Can anyone please suggest a solution to this problem?

Thank you
Gajraj Rathore

The usual cause of this issue (you’ve installed something, but it isn’t
there) is that the “pip” you used is not associated with the python
you’re using.

If you’re running from the command line, and let us say using the
command “python3” to invoke Python, you can invoke the approrpiate pip
like this:

python3 -m pip install fpdf

The purpose here is to run pip so that it installs in the same Python
you invoke. If you’re running a different python, replace “python3”
above suitably.

Aside: do you mean “fudf” or “fpdf”? You use both in your question and
I’m hoping one is a typing mistake.

Having sorted things out with the command line (where things are easier
to control), then do to your IDE and see which Python it is configured
to used. Then make sure you’ve done the pip install with that, too. Or
adjust it to use your preferred python.

Cameron Simpson