Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ModuleNotFoundError: No module named 'qrcode' python 3.9

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'
like image 749
Xotiic Avatar asked May 23 '26 09:05

Xotiic


2 Answers

Install the qrcode with admin rights

sudo pip install qrcode 

or

sudo pip3 install qrcode
like image 162
Anandh G Avatar answered May 30 '26 14:05

Anandh G


use pip install qrcode this will install the required dependency.

like image 29
manav014 Avatar answered May 30 '26 13:05

manav014



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!