Arya Golkari
Arya Golkari

Reputation: 51

Python: ModuleNotFoundError despite module being installed

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?

Upvotes: 3

Views: 269

Answers (1)

Arya Golkari
Arya Golkari

Reputation: 51

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.

Upvotes: 2

Related Questions