Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python: ModuleNotFoundError despite module being installed

Tags:

python

I made a module named 'calc' and installed it using the following command in cmd: py -3 -m pip install calc-2.1.tar.gz. I can import the module and use it when I run python in cmd. Yet, anywhere else, it doesn't work. Both IDLE and Anaconda raise ModuleNotFoundError. The same goes for other modules I try to install.

By the way, I'm really new to python, so could you please be a bit more specific with the instructions?

like image 462
Arya Golkari Avatar asked Feb 19 '26 02:02

Arya Golkari


1 Answers

Ok, I figured out what the problem was. I was using different versions of python (3.7 in IDLE, 3.8 in Spyder, 3.9 in cmd) which is why the module installed by cmd didn't work other places.

like image 133
Arya Golkari Avatar answered Feb 21 '26 17:02

Arya Golkari



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!