ModuleNotFoundError: No module named 'qrcode' python 3.9

Viewed 6388

I have already installed qrcode library in my command prompt and also updated my command prompt. In the command prompt it says that everything is fine but when I go to PyCharm and type in:

import qrcode

img = qrcode.make("This is the qrcode")
img.save("myqrcode.png")

And when I run it, it says:

Traceback (most recent call last):
  File "C:\Users\Antho\PycharmProjects\pythonProject\main.py", line 1, in <module>
    import qrcode
ModuleNotFoundError: No module named 'qrcode'
2 Answers

Install the qrcode with admin rights

sudo pip install qrcode 

or

sudo pip3 install qrcode

use pip install qrcode this will install the required dependency.

Related